summaryrefslogtreecommitdiff
path: root/test/files
Commit message (Collapse)AuthorAgeFilesLines
* Merge pull request #2462 from magarciaEPFL/backendish9Paul Phillips2013-05-101-2/+2
|\ | | | | SI-6863 root cause fixed using factory of scala.runtime.*Ref
| * SI-6863 root cause fixed using factory of scala.runtime.*RefMiguel Garcia2013-04-271-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit does away with an error-prone division of labor between UnCurry and LambdaLift, a division of labor by which UnCurry had to anticipate under which circumstances LambdaLift creates a scala.runtime.*Ref whose initial value is given by a an expression including a Try in non-statement position. That sounds complicated, and it is. The solution so far (fixing SI-6863) is replaced by a simpler approach, at the cost of forward binary comptability with pre-2.11 releases, this time fixing the root cause of SI-6863. From now on, a s.r.*Ref is instantiated via invocation of a static factory method in the s.r.*Ref class in question. Unlike the code that was emitted so far (which involved NEW refclass, DUP, expr, INVOKESPECIAL refclass.<init>) the "expr" doesn't appear on the operand stack on top of the *Ref value being initialized. In other words, the *Ref initialization is in statement position provided "expr" is.
* | Merge pull request #2483 from adriaanm/merge-2.10.xPaul Phillips2013-05-0220-11/+328
|\ \ | | | | | | Merge 2.10.x
| * \ Merge 2.10.x into masterAdriaan Moors2013-05-0220-11/+328
| |\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: bincompat-forward.whitelist.conf src/compiler/scala/tools/nsc/matching/Patterns.scala src/compiler/scala/tools/nsc/transform/patmat/Logic.scala src/compiler/scala/tools/nsc/typechecker/Infer.scala src/scaladoc/scala/tools/nsc/doc/model/ModelFactory.scala test/files/neg/t5663-badwarneq.check
| | * \ Merge pull request #2432 from retronym/ticket/delayed-init-refPaul Phillips2013-04-303-0/+53
| | |\ \ | | | | | | | | | | Warn on selection of vals from DelayedInit subclasses.
| | | * | Warn on selection of vals from DelayedInit subclasses.Jason Zaugg2013-04-233-0/+53
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Which are likely to yield null, if the program didn't start. This is a common source of confusion for people new to the language, as was seen during the Coursera course. The test case shows that the usage pattern within Specs2 won't generate these warnings.
| | * | | Merge pull request #2439 from retronym/ticket/7369Adriaan Moors2013-04-275-0/+95
| | |\ \ \ | | | | | | | | | | | | SI-7369 Avoid spurious unreachable warnings in patterns
| | | * | | SI-7369 Avoid spurious unreachable warnings in patternsJason Zaugg2013-04-245-0/+95
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Unreachability analysis draws on the enumerated domain of types (e.g sealed subclasses + null, or true/false), and also looks at all stable identifier patterns tested for equality against the same 'slot' in a pattern. It was drawing the wrong conclusions about stable identifier patterns. Unlike the domain constants, two such values may hold the same value, so we can't assume that matching X precludes matching Y in the same slot in a subsequent case. For example: val X: Boolean = true; val Y: Boolean = true def m1(t1: Tuple1[Boolean]) = t1 match { case Tuple1(true) => case Tuple1(false) => case Tuple1(false) => // correctly unreachable } def m2(t1: Tuple1[Boolean]) = t1 match { case Tuple1(X) => case Tuple1(Y) => // spurious unreachable warning } // // Before // reachability, vars: V2: Boolean ::= true | false// Set(false, Y, X, true) // = x1._1 V1: (Boolean,) ::= null | ... // = x1 equality axioms: V2=true#4 \/ V2=false#5 /\ -V2=false#5 \/ -V2=Y#3 /\ -V2=false#5 \/ -V2=X#2 /\ -V2=false#5 \/ -V2=true#4 /\ -V2=Y#3 \/ -V2=X#2 /\ -V2=Y#3 \/ -V2=true#4 /\ -V2=X#2 \/ -V2=true#4 // // After // reachability, vars: V2: Boolean ::= true | false// Set(false, Y, X, true) // = x1._1 V1: (Boolean,) ::= null | ... // = x1 equality axioms: V2=true#4 \/ V2=false#5 /\ -V2=false#5 \/ -V2=true#4
| | * | | | SI-6943 warn on value class miscomparison.Paul Phillips2013-04-242-8/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There's a very dangerous situation running around when you combine universal equality with value classes: // All over your code val x = "abc" if (x == "abc") ... // Hey let's make x a value class val x = new ValueClass("abc") // Uh-oh There was until now no warning when comparing a value class with something else. Now there is.
| | * | | | Merge pull request #2420 from retronym/ticket/6675-2Jason Zaugg2013-04-232-0/+21
| | |\ \ \ \ | | | |/ / / | | |/| | | SI-6675 Avoid spurious warning about pattern bind arity.
| | | * | | SI-6675 Avoid spurious warning about pattern bind arity.Jason Zaugg2013-04-212-0/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In 692372ce, we added a warning (under -Xlint) when binding a `TupleN` in to a single pattern binder, which wasn't allowed before 2.10.0, and more often than not represents a bug. However, that warning overstretched, and warned even when using a Tuple Pattern to bind to the elements of such a value. This commit checks for this case, and avoids the spurious warnings. A new test case is added for this case to go with the existing test for SI-6675: $ ./tools/partest-ack 6675 % tests-with-matching-paths ... 3 % tests-with-matching-code ... 2 # 3 tests to run. test/partest --show-diff --show-log \ test/files/neg/t6675-old-patmat.scala \ test/files/neg/t6675.scala \ test/files/pos/t6675.scala \ "" Testing individual files testing: [...]/files/pos/t6675.scala [ OK ] Testing individual files testing: [...]/files/neg/t6675-old-patmat.scala [ OK ] testing: [...]/files/neg/t6675.scala [ OK ] All of 3 tests were successful (elapsed time: 00:00:03)
| | * | | | Merge pull request #2358 from adriaanm/ticket-7330Jason Zaugg2013-04-214-3/+13
| | |\ \ \ \ | | | | | | | | | | | | | | SI-7330 better error when pattern's not a value
| | | * | | | SI-7330 better error when pattern isn't a valueAdriaan Moors2013-04-084-3/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Somehow an applied type managed to sneak past the type checker in pattern mode. Patterns must be values, though. `case C[_] =>` was probably meant to be `case _: C[_] =>` Advice is dispensed accordingly. (Generalizing the existing advice machinery.)
| | * | | | | Merge pull request #2410 from paulp/pr/parameterized-implicitJason Zaugg2013-04-212-0/+14
| | |\ \ \ \ \ | | | | | | | | | | | | | | | | Quiet down overloaded implicit warning.
| | | * | | | | Quiet down overloaded implicit warning.Paul Phillips2013-04-182-0/+14
| | | | |/ / / | | | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Apparently implicit classes product both a method symbol and a module symbol, both of which are marked implicit, which left this warning code believing there was an overloaded implicit method.
| | * | | | | Merge pull request #2322 from retronym/ticket/7200Jason Zaugg2013-04-202-0/+84
| | |\ \ \ \ \ | | | |_|_|/ / | | |/| | | | SI-7200 Test case for fixed type inference error.
| | | * | | | SI-7200 Test case for fixed type inference error.Jason Zaugg2013-03-272-0/+84
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Broken in 2.9.2 and 2.10.0, but working in 2.10.1 --- sandbox/2.10.0.log +++ sandbox/2.10.1.log def coflatMap[A >: Nothing <: Any, B >: Nothing <: Any](f: Test.Nel[A] => B): Test.Nel[A] => Test.Nel[B] = ((l: Test.Nel[A]) => Test.this.Nel.apply[B](f.apply(l), l.tail match { case immutable.this.Nil => immutable.this.Nil - case (hd: A, tl: List[A])scala.collection.immutable.::[A]((h @ _), (t @ _)) => { - val r: Test.Nel[Nothing] = NelFoo.this.coflatMap[A, Nothing](f).apply(Test.this.Nel.apply[A](h, t)); + case (hd: A, tl: List[A])scala.collection.immutable.::[?A1]((h @ _), (t @ _)) => { + val r: Test.Nel[B] = NelFoo.this.coflatMap[A, B](f).apply(Test.this.Nel.apply[A](h, t)); { - <synthetic> val x$1: Nothing = r.head; - r.tail.::[Nothing](x$1) + <synthetic> val x$1: B = r.head; + r.tail.::[B](x$1) } } })) b74c33eb86 represents the exact moment of progression. Comments in pos/t7200b.scala, a minimal test that demonstrates the problem without type constructors or code execution, pinpoint the line of code responsible for the fix. Incidentally, I'm currently on a train somewhere between Solothurn and Biel, and am consequently without the power of scala-bisector. Undeterred, and inspired by a line I saw in Skyfall last night ("sometimes the olds ways are better"), I just pulled off a two-hop bisection. Take that, O(log N)! The one remaining worry is the appearance of the type variable ?A1 in the output of -Xprint:typer for run/t7200.scala.
* | | | | | | Merge pull request #2406 from paulp/issue/7362Paul Phillips2013-04-3012-671/+747
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | SI-7362, crash in presentation compiler
| * | | | | | | More useful checkfile output in interactive tests.Paul Phillips2013-04-3010-692/+692
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I resisted the urge to fix "aksTypeCompletion" for as long as I possibly could. While I was there I threw in what seem to be like significant output improvements, but you tell me.
| * | | | | | | SI-7362, crash in presentation compiler.Paul Phillips2013-04-303-0/+76
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Code by retronym, test by huitseeker, I just move stuff around.
* | | | | | | | SI-7349 Partest supports test-interfaceSom Snytt2013-04-302-54/+7
|/ / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Partest uses test-interface API to invoke ScalaCheck. This obviates ad hoc output checking for result status. The context class loader is set to a loader that the scaladoc scalacheck tests can use.
* | | | | | | Merge pull request #2428 from hubertp/issue/7291Paul Phillips2013-04-304-6/+32
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | SI-7291: Don't throw exceptions while encountering diverging expansion.
| * | | | | | | SI-7291: No exception throwing for diverging implicit expansionHubert Plociniczak2013-04-264-6/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since we don't throw exceptions for normal errors it was a bit odd that we don't do that for DivergingImplicit. As SI-7291 shows, the logic behind catching/throwing exception was broken for divergence. Instead of patching it, I rewrote the mechanism so that we now another SearchFailure type related to diverging expansion, similar to ambiguous implicit scenario. The logic to prevent diverging expansion from stopping the search had to be slightly adapted but works as usual. The upside is that we don't have to catch diverging implicit for example in the presentation compiler which was again showing that something was utterly broken with the exception approach.
* | | | | | | | Route -explaintypes through reporter.Paul Phillips2013-04-291-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Sick of seeing Console printlns during partest runs. You should not print anything to Console.{out,err} if it's ever going to happen outside developerland.
* | | | | | | | Merge pull request #2421 from paulp/pr/print-method-positionsPaul Phillips2013-04-272-0/+50
|\ \ \ \ \ \ \ \ | |_|_|_|_|_|_|/ |/| | | | | | | -Yshow-member-pos, print the positions of members.
| * | | | | | | -Yshow-member-pos, print the positions of members.Paul Phillips2013-04-202-0/+50
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Here for instance is a command line which leverages the output of this option to print the method bodies of all methods called 'transformInfo' found under src. Given 1500 source files it accomplishes this in four seconds, thanks to -Ystop-after:parser. % scalac -Yshow-member-pos sed -Ystop-after:parser \ $(find src/compiler -name '*.scala') | \ grep transformInfo | sed 's/ # .*//;' | \ while read line; do echo "// $line" && gsed -n $line && echo; done Or more simply, the start/end lines of each member of Random: % scalac -Yshow-member-pos "" ./src/library/scala/util/Random.scala ./src/library/scala/util/Random.scala 20,134 class Random 33 def nextBoolean 38 def nextBytes 43 def nextDouble 48 def nextFloat 54 def nextGaussian 59 def nextInt 65 def nextInt 70 def nextLong 81,89 def nextString 82,86 def safeChar 83 val surrogateStart 84 val res 94,98 def nextPrintableChar [snip] It makes me sad I'm always in the position of having to hack the compiler to do this sort of thing. All we need is something like -Yinsert-phase:Foo where Foo is a class implementing a (Phase, Tree) => Tree method, and the compiler runs all the unit.bodies through it after each phase, and then one could easily accomplish this in the privacy of one's own compiler.
* | | | | | | | Merge pull request #2442 from soc/SI-7403Paul Phillips2013-04-261-2/+2
|\ \ \ \ \ \ \ \ | |_|_|/ / / / / |/| | | | | | | SI-7403 Stream extends Serializable
| * | | | | | | SI-7403 Stream extends SerializableSimon Ochsenreither2013-04-251-2/+2
| | |/ / / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | Additionally, add @deprecatedInheritance to warn creators of custom subclasses that the class will be sealed in the future.
* | | | | | | Merge pull request #2430 from paulp/issue/4365Adriaan Moors2013-04-262-0/+40
|\ \ \ \ \ \ \ | |/ / / / / / |/| | | | | | SI-4365 nondeterministic failure in asSeenFrom
| * | | | | | SI-4365 nondeterministic failure in asSeenFromPaul Phillips2013-04-222-0/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Under some order-dependent conditions (if source files arrive in one order it happens, in the other order it does not) more than one set of type parameters are created for a given class. Previously this would lead to a crash in asSeenFrom when a type parameter had to be matched up with a type application. Now when that situation arises I compare them by name and log a dev warning if it hits. This does not risk anything undesirable happening because the wayward type parameter's owner is always the right class; it's only the class type parameters which don't include the wayward one. Since in a given type parameter list names are unique, we have enough information to salvage the search.
* | | | | | | Merge branch 'master' into pr/warning-cleanupPaul Phillips2013-04-245-11/+13
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/compiler/scala/tools/nsc/typechecker/Contexts.scala
| * | | | | | | SI-7402 List extends SerializableSimon Ochsenreither2013-04-243-6/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | While we are all aware of the issues around Serialization, I think in this case it is perfectly sound and safe to make List serializable: - List is not an interface, it is the base type of an ADT. Common behavior of its members should be reflected in the base type. - List is sealed, there is no chance of an user providing a new non-serializable subtype of List.
| * | | | | | | Disabled failing bitset test.Paul Phillips2013-04-232-5/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It's a couple orders of magnitude out of whack when a test demands a gigabyte of memory to pass. We might need to start collecting per-test stats to avoid this kind of thing in the future. It's a huge waste of time.
* | | | | | | | Eliminate a pile of -Xlint warnings.Paul Phillips2013-04-231-7/+0
|/ / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some unused private code, unused imports, and points where an extra pair of parentheses is necessary for scalac to have confidence in our intentions.
* | | | | | | Merge pull request #2417 from paulp/pr/empty-type-boundsJason Zaugg2013-04-239-18/+14
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | Simplify type bounds.
| * | | | | | | Simplify type bounds.Paul Phillips2013-04-209-18/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I started out looking to limit the noise from empty type bounds, i.e. the endless repetition of class A[T >: _root_.scala.Nothing <: _root_.scala.Any] This led me to be reminded of all the unnecessary and in fact damaging overreaches which are performed during parsing. Why should a type parameter for which no bounds are specified be immediately encoded with this giant tree: TypeBounds( Select(Select(Ident(nme.ROOTPKG), tpnme.scala_), tpnme.Nothing), Select(Select(Ident(nme.ROOTPKG), tpnme.scala_), tpnme.Any) ) ...which must then be manually recognized as empty type bounds? Truly, this is madness. - It deftly eliminates the possibility of recognizing whether the user wrote "class A[T]" or "class A[T >: Nothing]" or "class A[T <: Any]" or specified both bounds. The fact that these work out the same internally does not imply the information should be exterminated even before parsing completes. - It burdens everyone who must recognize type bounds trees, such as this author - It is far less efficient than the obvious encoding - It offers literally no advantage whatsoever Encode empty type bounds as TypeBounds(EmptyTree, EmptyTree) What could be simpler.
* | | | | | | | SI-7408 Fix test by sorting results of getDeclaredClassesSimon Ochsenreither2013-04-231-10/+21
| |/ / / / / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | run/t4023 can fail (and has already) because the order of elements in the reflection API is not specified and can differ between platforms (e. g. HotSpot and Avian) or even versions (Java 7 vs. Java 8).
* | | | | | | Merge pull request #2360 from ihji/bugfix/SI-7080Jason Zaugg2013-04-212-0/+18
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | SI-7080 improve boundary value checking for BitSet
| * | | | | | | SI-7080 improve boundary value checking for BitSetHeejong Lee2013-04-072-0/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When BitSet accepts a very large integer such as Int.MaxValue, integer overflow possibly occurs in the calculation of boundary value "nwords * WordLength". This faulty boundary condition causes empty-iterator problem like following: scala> import collection.mutable.BitSet import collection.mutable.BitSet scala> val x = BitSet(Int.MaxValue) x: scala.collection.mutable.BitSet = BitSet() scala> x.iterator res0: Iterator[Int] = empty iterator
* | | | | | | | SI-7324 jvm not cool with 255+ parametersPaul Phillips2013-04-212-0/+61
| |_|/ / / / / |/| | | | | | | | | | | | | | | | | | | | Fail those monster methods rather than generating bad bytecode.
* | | | | | | Merge pull request #2361 from retronym/ticket/7337Jason Zaugg2013-04-202-0/+20
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | SI-7337 Error out on missing -d directory.
| * | | | | | | SI-7337 Error out on missing -d directory.Jason Zaugg2013-04-062-0/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This check was removed without comment in 3a30af154, the addition of JSR-223 support for the interpreter. After this commit, I manually tested that JSR-223 support works. scala> import javax.script._, collection.JavaConverters._; val manager = new ScriptEngineManager; manager.getEngineByName("scala").eval("List(1)") import javax.script._ import collection.JavaConverters._ manager: javax.script.ScriptEngineManager = javax.script.ScriptEngineManager@4418f61b res1: Object = List(1) 3a30af154 did not include a test case, so I don't know whether I've broken some other aspect of it. I tried the above as a `run` test, but hit two problems, one of them seemingly our fault, and the other a MacOS JDK wrinkle. 1. scala.reflect.internal.MissingRequirementError: object scala.runtime in compiler mirror not found. 2. java.lang.UnsatisfiedLinkError: no AppleScriptEngine in java.library.path I can't find my way to fix these, so JSR-223 remains untested. I don't think that commit was really up to standard; it could handle additional review, documentation, and testing. It might even be modularized so as not to pollute the REPL itself.
* | | | | | | | Merge remote-tracking branch 'origin/2.10.x' into ↵Jason Zaugg2013-04-2012-9/+97
|\ \ \ \ \ \ \ \ | |_|_|/ / / / / |/| | | / / / / | | |_|/ / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | merge/v2.10.1-245-g5147bb2-to-master Conflicts: src/compiler/scala/tools/nsc/transform/SpecializeTypes.scala src/compiler/scala/tools/nsc/typechecker/Typers.scala
| * | | | | | Merge pull request #2408 from paulp/pr/fully-qualified-namePaul Phillips2013-04-194-9/+9
| |\ \ \ \ \ \ | | | | | | | | | | | | | | | | Absolute path in error message.
| | * | | | | | Absolute path in error message.Paul Phillips2013-04-174-9/+9
| | | |_|_|/ / | | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As soon as you have a directory called "language" lying around, you will appreciate why the advice given regarding SIP-18 should be "import scala.language..." not "import language..."
| * | | | | | Merge pull request #2411 from retronym/ticket/7388Paul Phillips2013-04-192-0/+5
| |\ \ \ \ \ \ | | | | | | | | | | | | | | | | SI-7388 Be more robust against cycles in error symbol creation.
| | * | | | | | SI-7388 Be more robust against cycles in error symbol creation.Jason Zaugg2013-04-182-0/+5
| | |/ / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | `Symbol#toString` was triggering `CyclicReferenceError` (specifically, `accurateKindString` which calls `owner.primaryConstructor`.) The `toString` output is used when creating an error symbol to assign to the tree after an error (in this case, a non-existent access qualifier.) This commit catches the error, and falls back to just using the symbol's name.
| * | | | | | Merge pull request #2402 from retronym/ticket/7377Paul Phillips2013-04-194-0/+32
| |\ \ \ \ \ \ | | | | | | | | | | | | | | | | SI-7377 Fix retypechecking of patterns on case companion alias
| | * | | | | | SI-7377 Fix retypechecking of patterns on case companion aliasJason Zaugg2013-04-174-0/+32
| | |/ / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some ancient code in Typers switches from PATTERNmode to EXPRmode when encountering `stableF(...)`. It just typechecks `stableF` and discards the arguments. To the best of Martin's recollection, this has something to do with the need to typecheck patterns rather late in the compiler, after `a.b` had been translated to `a.b()` in `Uncurry`. I'm not able to motivate this with tests using `-Xoldpatmat`; was there ever an even older pattern matcher that ran *after* uncurry? What changed in 2.10.1 to expose this wrinkle? dfbaaa17 fixed `TypeTree.copyAttrs` to copy the original tree. During the descent of `ResetAttrs`, sub-trees are duplicated before begin further transformed. Duplicating the `Match` in 2.10.0 would forget that the original tree of: pat = (a: Int)Foo(_) `----------` `- TypeTree((a: Int)Foo), with original Select(..., "FooAlias") The retypechecking would operate on the `MethodType`, rather than the `Select`, which was not considered a stable application. For 2.10.x, I've just tightened up the condition to only hit this if `args` is empty. I'm almost certain that the code can be removed altogether, and I'll do that when this is merged to master.
| * | | | | | Merge pull request #2370 from retronym/ticket/7319-2Paul Phillips2013-04-192-0/+51
| |\ \ \ \ \ \ | | | | | | | | | | | | | | | | SI-7319 Avoid unflushed error/warning buffers in startContext