summaryrefslogtreecommitdiff
path: root/test/files/run
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'master' into topic/sip18Martin Odersky2012-04-134-0/+61
|\
| * Workaround for SI-5583.Paul Phillips2012-04-122-0/+31
| | | | | | | | | | Somehow type args to be applied arrive in the specialized subclass where type args are no longer applicable. Log and discard.
| * Fix for SI-5535.Paul Phillips2012-04-122-0/+30
| |
* | Fixed tests to account for SIP 18Martin Odersky2012-04-1312-99/+114
| |
* | Added languageFeature annotation (was missing before). Resolved problem with ↵Martin Odersky2012-04-1384-84/+84
|/ | | | late loading of nested classes in Definitions. Resolved handling of deprecated idents `then` and `macro`. Massaged test flags.
* Merge commit 'refs/pull/375/head' into developPaul Phillips2012-04-12602-1014/+4375
|\
| * GroundTypeTag => ConcreteTypeTagEugene Burmako2012-04-1228-110/+110
| |
| * Next generation of macrosEugene Burmako2012-04-12602-1014/+4375
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Implements SIP 16: Self-cleaning macros: http://bit.ly/wjjXTZ Features: * Macro defs * Reification * Type tags * Manifests aliased to type tags * Extended reflection API * Several hundred tests * 1111 changed files Not yet implemented: * Reification of refined types * Expr.value splicing * Named and default macro expansions * Intricacies of interaction between macros and implicits * Emission of debug information for macros (compliant with JSR-45) Dedicated to Yuri Alekseyevich Gagarin
* | Implementation of SIP 13 take 2.Martin Odersky2012-04-111-1/+1
| |
* | Implementation of SIP 13 - implicit classesMartin Odersky2012-04-111-0/+10
|/
* Fix for SI-5648.Paul Phillips2012-04-103-0/+15
| | | | More care in warning about bad comparisons.
* Cleaning up some repl mechanisms.Paul Phillips2012-04-091-1/+1
|
* SI-4540 Fix [RichDouble|RichFloat|RichLong].isValid[Byte|Short|Char|Int].Dmitry Nadezhin2012-04-081-58/+273
| | | | | | | | | | This commit fixes test cases mentioned in comment 03/Apr/12 to SI-4540. Methods are fixed in leaf classes RichDouble|RichFloat|RichLong. Their superclasses are not modified. File is-valid-num.scala contains commented tests of isValidLong|isValidFloat|isValidLong, but they are not added anywhere now.
* Merge branch 'apr6-flags' of leaf:/scala/trunk into developPaul Phillips2012-04-061-18/+18
|\
* \ Merge commit 'pull/358/head' into developPaul Phillips2012-04-061-0/+16
|\ \
| * | Test case for overloading resolution during reflection.Martin Odersky2012-04-051-0/+16
| | |
* | | Make NumericRange# O(1) instead of O(n).Simon Ochsenreither2012-04-062-17/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It makes me a bit nervous that NumericRange[Int] will get different wrong values in overflow situations compared to Range due to the missing toLong though. It could probably need some investigation if reordering the operations can rule out wrong values, e. g. only fail when the fold also fails. Apart from that, it might make sense to just throw an exception if an overflow happens instead of silent overflow.
* | | Fix for SI-5591.Geoff Reedy2012-04-062-0/+11
| |/ |/| | | | | And test case for SI-5591.
| |
| \
| \
| \
*---. \ Merge commit 'refs/pull/353/head'; commit 'refs/pull/354/head'; commit ↵Paul Phillips2012-04-053-0/+9
|\ \ \ \ | |_|_|/ |/| | | | | | | 'refs/pull/356/head'; commit 'refs/pull/337/head'; commit 'refs/pull/339/head' into develop
| | | * String interpolation bug fixDominik Gruntz2012-03-283-0/+9
| | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | This change fixes a bug in class StringContext.scala. Parts were not correctly added to the resulting string. This commit includes a test case which covers the example reported in the bug. Closes SI-5614.
* | / Added Option#fold.Paul Phillips2012-04-042-0/+24
|/ /
| |
| \
| \
| \
| \
| \
*-----. \ Merge remote-tracking branches 'axel22/feature/future-compat', ↵Paul Phillips2012-04-027-5/+193
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | 'dlwh/issues/5632', 'jsuereth/feature/import-jars-from-maven', 'nadezhin/master' and 'axel22/feature/collection-concurrent' into develop
| | | | * \ Merge branch 'master' into feature/collection-concurrentAleksandar Prokopec2012-04-0226-163/+697
| | | | |\ \ | | | |_|/ / | | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/library/scala/collection/JavaConversions.scala src/library/scala/collection/JavaConverters.scala Add one test for concurrent map conversion.
| | | * | | SI-5627 BigInt.equals(Number) and BigDecimal.equals(Number) should implement ↵Dmitry Nadezhin2012-04-022-2/+110
| | |/ / / | | | | | | | | | | | | | | | equality in mathematical sense
| | * / / a fast, functional PartialFunction implementationPavel Pavlov2012-03-301-3/+3
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | runtime.AbstractPartialFunction provides a default implementation for the new-style partial function. In principle this class is only subclassed by compiler-generated partial functions arising from matches. Either - the apply method (old-style partialfun) or - the applyOrElse method (current scheme) must be overridden, and the isDefinedAt method implemented. The applyOrElse method implementation is provided to ease the transition from the old scheme, since starr still generates old-style PartialFunctions, but locker's library has the new AbstractPartialFunction. Thus, this implementation is intended as a drop-in replacement for the old partial function, and does not require changes to the compiler. (compiler patches, both for old and new-style pattern matching, follow) - runtime.AbstractPartialFunction is based on PartialFunction.WithDefault Original version of FunctionWithDefault by Odersky (http://article.gmane.org/gmane.comp.lang.scala.internals/4032) - better performance for OrElse#applyOrElse, OrElse#lift, PF.cond - new combinator methods: PF#run, PF#runWith, PF.apply authored by @pavelpavlov, refactored by @adriaanm, review by @paulp
| * | | Revert the lisp test.Paul Phillips2012-03-282-543/+0
| | | | | | | | | | | | | | | | The lisp test enjoys the suffering of others.
| * | | Never write final fields outside of constructors.Paul Phillips2012-03-283-0/+44
| | | | | | | | | | | | | | | | | | | | | | | | Closes SI-3569, SI-3770. Also threw in experimental -Yoverride-vars. It's not robust.
| * | | Revived the lisp test.Paul Phillips2012-03-282-0/+543
|/ / / | | | | | | | | | | | | | | | All hail the lisp test! Closes SI-4579.
* | / Merge remote-tracking branch 'axel22/feature/collection-concurrent' into developPaul Phillips2012-03-274-42/+42
|\| | | |/ |/|
| * Rename ConcurrentTrieMap to concurrent.TrieMap.Aleksandar Prokopec2012-03-274-42/+42
| | | | | | | | | | | | | | | | Introduced the collection.concurrent package and introduced the concurrent.Map trait there. Deprecated the mutable.ConcurrentMap trait. Pending work - introduce the appropriate changes to JavaConversions and JavaConverters.
* | Merge remote-tracking branch 'adriaanm/topic/virtpatmat' into developPaul Phillips2012-03-233-0/+16
|\ \
| * | do nothing when closing closed block in ignoremodeAdriaan Moors2012-03-231-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | this came to light with the virtual pattern matcher, which emits jumps like `matchEnd3(_test(Test.this, false))`, where _test is a tailcall the nested jumping caused double-closing (the second time in ignore mode) thus. when closing a closed block in ignore mode, simply do nothing from genLoad for label-jumps: note: when one of the args to genLoadLabelArguments is a jump to a label, it will call back into genLoad and arrive at this case, which will then set ctx1.bb.ignore to true, this is okay, since we're jumping unconditionally, so the loads and jumps emitted by the outer call to genLoad (by calling genLoadLabelArguments and emitOnly) can safely be ignored, however, as emitOnly will close the block, which reverses its instructions (when it's still open), we better not reverse when the block has already been closed but is in ignore mode (if it's not in ignore mode, double-closing is an error) @dragos figured it out, all I did was write the comment and the `if` test case to repro basic blocks crasher the tailcall in the forward jump `matchEnd3(_test(Test.this, false))` in the following program crashes the back-end (error below) @scala.annotation.tailrec final def test(meh: Boolean): Boolean = { <synthetic> val _$this: Test.type = Test.this; _test(_$this,meh){ case <synthetic> val x1: Some[String] = new Some[String]("a"); case3(){ matchEnd2({ case <synthetic> val x1: Some[String] = x1; case4(){ if (x1.ne(null)) matchEnd3(if (meh) _test(Test.this, false) else false) else case5() }; case5(){ matchEnd3(_test(Test.this, false)) }; matchEnd3(x){ x } }) }; matchEnd2(x){ x } } }; The last instruction (of basic block 11) is not a control flow instruction: CONSTANT(false) // methods def test(meh: Boolean (BOOL)): Boolean { locals: value meh, value _$this, value x1, value x, value x, value x1 startBlock: 1 blocks: [1,2,3,4,5,6,7,8,9,10,11,12,13] 1: 4 JUMP 2 2: 5 NEW REF(class Some) 5 DUP(REF(class Some)) 5 CONSTANT("a") 5 CALL_METHOD scala.Some.<init> (static-instance) 5 STORE_LOCAL(value x1) 5 SCOPE_ENTER value x1 5 JUMP 3 3: 5 LOAD_LOCAL(value x1) 7 STORE_LOCAL(value x1) 7 SCOPE_ENTER value x1 7 JUMP 4 4: 7 LOAD_LOCAL(value x1) 7 CZJUMP (REF(class Object))NE ? 5 : 6 5: 8 LOAD_LOCAL(value meh) 8 CZJUMP (BOOL)NE ? 8 : 9 6: ? JUMP 11 7: 7 DROP BOOL 7 JUMP 11 8: 8 CONSTANT(false) 8 STORE_LOCAL(value meh) 8 JUMP 2 9: 8 CONSTANT(false) 8 JUMP 10 10: 8 STORE_LOCAL(value x) 8 JUMP 12 11: 9 JUMP 2 9 STORE_LOCAL(value meh) 9 CONSTANT(false) 12: 7 LOAD_LOCAL(value x) 7 SCOPE_EXIT value x1 7 STORE_LOCAL(value x) 7 JUMP 13 13: 5 LOAD_LOCAL(value x) 5 SCOPE_EXIT value x1 5 RETURN(BOOL)
| * | [vpm] avoid verifyerror: leave jump to tail-pos labelAdriaan Moors2012-03-233-0/+15
| | | | | | | | | | | | | | | the following commit deals with the fall-out in basicblocks (double closing of blocks in ignore mode)
* | | Document regex replacement strings behavior.Daniel C. Sobral2012-03-232-0/+8
|/ / | | | | | | | | | | | | | | | | All replacement methods use dolar signs to identify groups in the matched string, and backslashes to escape characters. Document this behavior, and provide a method that can be used to properly quote replacement strings when this behavior is not desired. Closes SI-4750.
* | Undo the revert.Lukas Rytz2012-03-232-16/+0
| | | | | | | | | | reverts 3db29dde051614d976bca92a1cdeb109c9c0ab01 and 5af2bf54d21ac63236cd6e68586b2c38fa0f28c3 restores 19a48510c2e18430a35319c04dfe3bad7119f23f
* | Test case for cause of previous commit's reversion.Paul Phillips2012-03-222-0/+16
| |
* | An illustrative delayedInit test.Paul Phillips2012-03-214-0/+242
| |
* | Fixed test cases.Martin Odersky2012-03-211-1/+9
| |
* | Allows now private primary constructors in value classes.Martin Odersky2012-03-211-15/+69
| |
* | Restore irrefutability commits.Paul Phillips2012-03-202-0/+15
| | | | | | | | This reverts commit d8ba5d091e5641553b438ef9930a6023a2709dcd.
* | Lots of tedious warning and tree printing work.Paul Phillips2012-03-203-56/+56
| | | | | | | | | | | | | | | | | | | | | | Fewer deprecation warnings, prettier trees, prettier symbols, more polished error messages. Oh the interesting people you meet handling warnings, I feel sorry for you all that I get to do it all the time. One of the characters I met invited me into the "Dead Code Society" and that's what I'm doing on Tuesdays now. No of course you haven't, it's a SECRET society.
* | Revert irrefutability commits.Paul Phillips2012-03-202-15/+0
| | | | | | | | | | Temporary reversion of irrefutability commits in interests of stable milestone. Expect to restore shortly.
* | [vpm] typer synths Function{} for empty-sel matchAdriaan Moors2012-03-202-88/+186
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | typedMatchAnonFun is called from typedFunction when the function's body is a match this is work-in-progres: the compiler currently won't bootstrap under -Yvirtpatmat see also the pending test make sure to use the right context in typeFunction when the body is a Match when typer is set up for type checking a Function, the current owner is the symbol for the function, but we'll type check a Block(List(ClassDef(cd)), New(cd)) when the function is a match, and the function symbol is nowhere to be found, so go to outer context in patmatvirt: - simplified default case gen (no need for a Casegen instance) - using CASE | SYNTHETIC to detect generated matches (for switches) and avoid typing them endlessly more uniform, and necessary for new-style anon Function class instance gen for matches
* | [vpm] TODO note: make unapply type list stricterAdriaan Moors2012-03-203-0/+13
| | | | | | | | | | | | | | | | when an unapply returns Option[T] where T is some ProductN, does that mean the unapply returns 1 result, i.e., that T, or did it mean to return N results? to disambiguate, falling back to stricter spec-adherence, which requires T be exactly TupleN for N results for now, allow extractor result to be any product, not just tuple
* | Test cases closes SI-4574.Paul Phillips2012-03-192-0/+15
|/ | | | Looks like I got that irrefutability bug too.
* Merge branch 'mar17-colorize'Paul Phillips2012-03-182-0/+726
|\
| * Library for ansi color management.Paul Phillips2012-03-182-0/+726
| | | | | | | | | | | | | | | | | | Having now experienced the unbelievable difference it makes to have one's voluminous debugging output effectively color-coded, I had to librarize the ansi codes in order to use them. This could all go in the standard library, or as soon as I can easily make use of compiler dependencies, a separate library altogether. For now it hides away in scala.tools.util.color.
* | Added +: and :+ extractors to mirror append/prepend.Josh Suereth2012-03-162-0/+10
|/ | | | | | | | * +: does head/tail decomposition on any Seq * :+ does init/last decomposition on any Seq * Both preserve specific Seq types. Review by @odersky
* Testing compiler asSeenFrom directly.Paul Phillips2012-03-163-1/+446
| | | | | | | It's more of a "dump what it says to a file so we'll know if any of this ever changes" than a "test" per se. It could use some wheat/chaff/nonsense/sense sorting. Still, it would be great to have more stuff like this.
*---. Merge remote-tracking branches 'VladUreche/feature/inheritdoc-clean', ↵Paul Phillips2012-03-169-59/+59
|\ \ \ | | | | | | | | | | | | 'acruise/t1118', 'hubertp/issue/5572', 'hubertp/topic/nightly-checkinit', 'axel22/feature/pc-ctrie', 'jsuereth/master-version-fixin' and 'axel22/feature/checkinit-transient' into develop