summaryrefslogtreecommitdiff
path: root/test
Commit message (Collapse)AuthorAgeFilesLines
* Merge remote-tracking branch 'origin/2.10.x' into ↵Jason Zaugg2013-04-1523-21/+178
|\ | | | | | | | | | | | | | | | | | | | | merge/v2.10.1-235-g4525e92-to-master Conflicts: bincompat-backward.whitelist.conf bincompat-forward.whitelist.conf src/compiler/scala/tools/nsc/transform/SpecializeTypes.scala src/compiler/scala/tools/nsc/typechecker/Typers.scala src/reflect/scala/reflect/internal/Types.scala
| * SI-6286 IllegalArgumentException handling specialized method.Eugene Vigdorchik2013-04-101-0/+10
| | | | | | | | | | | | Specialize assigns SpecialOverride info to a specialized method even when there is a further specialization that should be forwarded to.
| * Merge pull request #2367 from vigdorchik/si-6387-revertAdriaan Moors2013-04-095-0/+16
| |\ | | | | | | Revert "SI-6387 Clones accessor before name expansion"
| | * Revert "SI-6387 Clones accessor before name expansion"Eugene Vigdorchik2013-04-085-0/+16
| | | | | | | | | | | | | | | | | | This reverts commit 4e10b2c833fa846c68b81e94a08d867e7de656aa. Add 6387 test to pending and 7341 to up-to-date.
| * | Merge pull request #2365 from u-abramchuk/SI6386Adriaan Moors2013-04-091-0/+5
| |\ \ | | | | | | | | SI-6386 typed existential type tree's original now have tpe set
| | * | SI-6386 typed existential type tree's original now have tpe setUladzimir Abramchuk2013-04-091-0/+5
| | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tree reification fails for ExistentialTypeTree. The reason is that the tree passed for reification (see reifyTree at GetTrees.scala) must have not null tpe (see reifyBoundType at GenTrees.scala), which is not true in the case of ExistentialTypeTree. Why is it so? The tree passed to reifyTree was obtained in the reshape phase of reificationusing using original TypeTrees that reporesent pre- typer representation of a type. The problem is that original's tpe for ExistentialTypeTree is not set. So the solution to the issue is to create ExistentialTypeTree's original in a such way that is has actual tpe set.
| * | Merge pull request #2354 from adriaanm/ticket-7289Adriaan Moors2013-04-094-0/+88
| |\ \ | | | | | | | | SI-7289 Less strict type application for TypeVar.
| | * | SI-7289 Less strict type application for TypeVar.Adriaan Moors2013-04-084-0/+88
| | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When a type constructor variable is applied to the wrong number of arguments, return a new type variable whose instance is `ErrorType`. Dissection of the reported test case by @retronym: Define the first implicit: scala> trait Schtroumpf[T] defined trait Schtroumpf scala> implicit def schtroumpf[T, U <: Coll[T], Coll[X] <: Traversable[X]] | (implicit minorSchtroumpf: Schtroumpf[T]): Schtroumpf[U] = ??? schtroumpf: [T, U <: Coll[T], Coll[X] <: Traversable[X]](implicit minorSchtroumpf: Schtroumpf[T])Schtroumpf[U] Call it explicitly => kind error during type inference reported. scala> schtroumpf(null): Schtroumpf[Int] <console>:10: error: inferred kinds of the type arguments (Nothing,Int,Int) do not conform to the expected kinds of the type parameters (type T,type U,type Coll). Int's type parameters do not match type Coll's expected parameters: class Int has no type parameters, but type Coll has one schtroumpf(null): Schtroumpf[Int] ^ <console>:10: error: type mismatch; found : Schtroumpf[U] required: Schtroumpf[Int] schtroumpf(null): Schtroumpf[Int] ^ Add another implicit, and let implicit search weigh them up. scala> implicitly[Schtroumpf[Int]] <console>:10: error: diverging implicit expansion for type Schtroumpf[Int] starting with method schtroumpf implicitly[Schtroumpf[Int]] ^ scala> implicit val qoo = new Schtroumpf[Int]{} qoo: Schtroumpf[Int] = $anon$1@c1b9b03 scala> implicitly[Schtroumpf[Int]] <crash> Implicit search compares the two in-scope implicits in `isStrictlyMoreSpecific`, which constructs an existential type: type ET = Schtroumpf[U] forSome { type T; type U <: Coll[T]; type Coll[_] <: Traversable[_] } A subsequent subtype check `ET <:< Schtroumpf[Int]` gets to `withTypeVars`, which replaces the quantified types with type variables, checks conformance of that substitued underlying type against `Schtroumpf[Int]`, and then tries to solve the collected type constraints. The type var trace looks like: [ create] ?T ( In Test#schtroumpf[T,U <: Coll[T],Coll[_] <: Traversable[_]] ) [ create] ?U ( In Test#schtroumpf[T,U <: Coll[T],Coll[_] <: Traversable[_]] ) [ create] ?Coll ( In Test#schtroumpf[T,U <: Coll[T],Coll[_] <: Traversable[_]] ) [ setInst] Nothing ( In Test#schtroumpf[T,U <: Coll[T],Coll[_] <: Traversable[_]], T=Nothing ) [ setInst] scala.collection.immutable.Nil.type( In Test#schtroumpf[T,U <: Coll[T],Coll[_] <: Traversable[_]], U=scala.collection.immutable.Nil.type ) [ setInst] =?scala.collection.immutable.Nil.type( In Test#schtroumpf[T,U <: Coll[T],Coll[_] <: Traversable[_]], Coll==?scala.collection.immutable.Nil.type ) [ create] ?T ( In Test#schtroumpf[T,U <: Coll[T],Coll[_] <: Traversable[_]] ) [ setInst] Int ( In Test#schtroumpf[T,U <: Coll[T],Coll[_] <: Traversable[_]], T=Int ) [ create] ?T ( In Test#schtroumpf[T,U <: Coll[T],Coll[_] <: Traversable[_]] ) [ create] ?U ( In Test#schtroumpf[T,U <: Coll[T],Coll[_] <: Traversable[_]] ) [ create] ?Coll ( In Test#schtroumpf[T,U <: Coll[T],Coll[_] <: Traversable[_]] ) [ setInst] Nothing ( In Test#schtroumpf[T,U <: Coll[T],Coll[_] <: Traversable[_]], T=Nothing ) [ setInst] Int ( In Test#schtroumpf[T,U <: Coll[T],Coll[_] <: Traversable[_]], U=Int ) [ setInst] =?Int ( In Test#schtroumpf[T,U <: Coll[T],Coll[_] <: Traversable[_]], Coll==?Int ) The problematic part is when `?Int` (the type var originated from `U`) is registered as a lower bound for `Coll`. That happens in `solveOne`: for (tparam2 <- tparams) tparam2.info.bounds.hi.dealias match { case TypeRef(_, `tparam`, _) => log(s"$tvar addLoBound $tparam2.tpeHK.instantiateTypeParams($tparams, $tvars)") tvar addLoBound tparam2.tpeHK.instantiateTypeParams(tparams, tvars) case _ => }
| * | Merge pull request #2349 from scalamacros/ticket/6937Adriaan Moors2013-04-0912-21/+59
| |\ \ | | |/ | |/| SI-6937 core type tags are no longer referentially unique
| | * SI-6937 core type tags are no longer referentially uniqueEugene Burmako2013-04-0312-21/+59
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Type tag factory used to evaluate the provided type creator in the context of the initial mirror in order to maintain referential equality of instances of standard tags. Unfortunately this evaluation might fail if the mirror provided doesn't contain the classes being referred to. Therefore I think we should avoid evaluating type creators there. Note that failure of evaluation doesn't mean that there's something bad going on. When one creates a type tag, the correct mirror / classloader to interpret that tag in might be unknown (like it happens here). This is okay, and this is exactly what the 2.10.0-M4 refactoring has addressed. Something like `res2.typeTag[A].in(currentMirror)` should be okay.
* | | Merge remote-tracking branch 'origin/2.10.x' into merge-2.10.xPaul Phillips2013-04-087-0/+98
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * origin/2.10.x: if starr.use.released fetch Scala ${starr.version} for STARR assume build.release when maven.version.suffix is set make quick.done depend on quick.bin again SI-7321 Memory leak in specialize on multiple compiler runs. Take the N^2 out of the compiler's TreeSet. SI-6900 Fix tailrec for dependent method types Simplify interplay between Uncurry Info- and Tree-Transformers Refactor existential related code out of types. Add a cautionary comment to TreeSymSubstitutor. SI-6715 Shouldn't return "" from TermNames.originalName Backport #2289's TermNames.unexpandedName as TermNames.originalName SI-7147 Diagnostic for unexplained assertion in presentation compiler. SI-6793 Don't use super param accessors if inaccessible. Correct sorting example for Ordering in scaladoc Conflicts: bincompat-backward.whitelist.conf bincompat-forward.whitelist.conf build.xml src/compiler/scala/tools/nsc/transform/UnCurry.scala src/reflect/scala/reflect/internal/StdNames.scala
| * | SI-6900 Fix tailrec for dependent method typesJason Zaugg2013-04-021-0/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Uncurry's info transformer could generate a MethodType with cloned parameter symbols. This type was used for the LabelDef generated in the TailCalls phase. But, the RHS of the method still contains types that refer to the original parmameter symbol. Spurious type errors ensued. I've spent a good chunk of time pursuing a more principled fix, in which we keep the symbols in the tree in sync with those in the MethodType. You can relive the procession of false dawns: https://github.com/scala/scala/pull/2248 Ultimately that scheme was derailed by a mismatch between the type parameter `T` and the skolem `T&` in the example below. trait Endo[A] { def apply(a: => A): A } class Test { def foo[T] = new Endo[(T, Unit)] { def apply(v1: => (T, Unit)) = v1 // no bridge created } } Interestingly, by removing the caching in SingleType, I got past that problem. But I didn't characterize it further. This commit sets asides the noble goal of operating in the world of types, and sledgehammers past the crash by casting the arguments to and the result of the label jump generated in TailCalls.
| * | Merge pull request #2319 from retronym/ticket/6793Paul Phillips2013-04-023-0/+31
| |\ \ | | | | | | | | SI-6793 Don't use super param accessors if inaccessible.
| | * | SI-6793 Don't use super param accessors if inaccessible.Jason Zaugg2013-03-263-0/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | "Alias replacement" has been with us since 2005 (13c59adf9). Given: package a { class C1(val v0: String) class C2(v1: String) extends a.C1(v1) { v1 } } The reference to `v1` is rewritten as `C2.super.v0()`, and no field is generated in `C2`. (Oddly, this optimization doesn't seem to kick in if these classes are in the empty package. That's probably a distinct bug.) However, this rewriting is done without consideration of the accessibility of `v0` from `C2`. This commit disables this optimization if there if `v0` is not accessible.
| * | | SI-6715 Shouldn't return "" from TermNames.originalNameKato Kazuyoshi2013-04-033-0/+31
| | | |
* | | | Merge pull request #2356 from paulp/pr/isSameTypeAdriaan Moors2013-04-082-6/+6
|\ \ \ \ | | | | | | | | | | Wonderfulizing isSameType
| * | | | Transcendent rewrite of isSameType.Paul Phillips2013-04-052-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A highly satisfying rewrite of isSameType. It's faster, clearer, shorter, better commented, and closer to correct. I am especially pleased that t5580b stopped compiling, given that nobody seemed to have much idea why it compiled in the first place.
* | | | | Merge pull request #2352 from soc/nan-testsPaul Phillips2013-04-056-0/+71
|\ \ \ \ \ | | | | | | | | | | | | Add float version of the double NaN tests
| * | | | | Add float version of the double NaN testsSimon Ochsenreither2013-04-046-0/+71
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The double version uncovered a bug in Avian already, so let's be safe and cover all the NaNs we have.
* | | | | | Merge pull request #2355 from sschaef/si-7300Paul Phillips2013-04-052-0/+13
|\ \ \ \ \ \ | |_|/ / / / |/| | | | | SI-7300 single line comment in multi line comment
| * | | | | SI-7300 single line comment in multi line commentSimon Schaefer2013-04-042-0/+13
| |/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This issue was fixed in 3d5c675982 but didn't get any test cases, which are added by this commit. Before, a single line comment that occurred before a closing multi line comment, like in `/*//*/`, was not treated as the beginning of a nested comment, thus the shown example was parsed as a valid comment.
* | | | | SI-6289 Paulptest demonstrating javac errorsSom Snytt2013-04-044-0/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is Paul's test demonstrating that Javac errors are correctly transcribed in the test transcript. A gratuitous Scala class is added to a later round to show that the test halts after the first error. The runner must supply absolute paths to javac so that absolute paths are reported in errors and stripped away by partest. The check file is differentiated for Java 6 and 7, and partest's runner will now post-process the `diff log check` to strip the diff which does not apply.
* | | | | SI-6289 Partest in technicolor and showing javac errorsSom Snytt2013-04-0445-7/+43
|/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Paulptest includes color and simplified test scarfing. Scalap tests are moved to the conventional name and location. Testicolor missed out on Josh Suereth's tweak to sort the files in a compilation round. Restore sortiness to test sources. Testicolor is due to one of Paul's branches on a timeline that apparently did not include the destruction of planet Earth and its colonies by the Xindi. Thanks also to Szabolcs Berecz for his merge effort. Merging is thankless work, but not as thankless as merging in a timeline that actually does terminate in the destruction of your home world and Enterprise. Archer had a supremely difficult choice: rescue humanity or live out his retirement with T'Pol waiting on him hand and foot? I'm sure I don't know how I'd choose.
* | | | Merge pull request #2337 from retronym/ticket/7110-2Paul Phillips2013-04-033-0/+13
|\ \ \ \ | | | | | | | | | | SI-7110 Warn about naked try without catch/finally
| * | | | SI-7110 Warn about naked try without catch/finallyJason Zaugg2013-03-293-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Before, this was allowed: scala> try ( 1 / 0 ) java.lang.ArithmeticException: / by zero But since the advent of util.Try, the subtle difference to the following seems dangerous: scala> import util.Try import util.Try scala> Try ( 1 / 0 ) res4: scala.util.Try[Int] = Failure(java.lang.ArithmeticException: / by zero) Discussion: https://groups.google.com/d/topic/scala-language/fy2vXD_3fF8/discussion There was some concern that this curtails a handy, temporary way to remove the exception handlers from some code. But after thinking about this, I contend that: a) those people can easily stomach the warning temporarily (modulo, of course, those with -Xfatal-warnings.) b) putting this warning behind Xlint will disable it for those who need it most: beginners. I also chose not to refer to 'scala.util.Try' in the error message as I think that has as much potential to confuse as it does to clarify.
* | | | | Merge pull request #2310 from retronym/ticket/6168Paul Phillips2013-04-029-0/+142
|\ \ \ \ \ | | | | | | | | | | | | SI-6168 Retain prefix when parsing types in JVM signatures
| * | | | | SI-6168 Retain prefix when parsing types in JVM signaturesJason Zaugg2013-03-259-0/+142
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When reading Java classfiles, the generic signatures are used to construct the corresponding Scala type signatures. In the enclosed test case, the field `SomeClass.f` had the JVM signature: LContext<LSomeClass;>.Field<Ljava.lang.Integer;>; The parser first (correctly) parsed the prefix as `Context[SomeClass]`. It then looked up the type symbol for `Field` in that that type. It then discarded the parsed prefix, and instead used the prefix from the info of the type symbol: `Context[ParentType]`. This commit changes the signature parser after the first `.` to use the result of prior parsing as the prefix. I've also included a test case with Java static inner classes, which don't require any special treatment.
* | | | | | Merge remote tracking branch 'origin/2.10.x' into ↵Jason Zaugg2013-04-0245-507/+1318
|\ \ \ \ \ \ | | |_|/ / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | topic/merge-2.10.x-to-v2.11.0-M2-74-g00e6c8b Conflicts: bincompat-backward.whitelist.conf bincompat-forward.whitelist.conf build.xml src/compiler/scala/reflect/reify/utils/Extractors.scala src/compiler/scala/tools/nsc/backend/jvm/GenJVM.scala src/compiler/scala/tools/nsc/symtab/classfile/ICodeReader.scala src/compiler/scala/tools/nsc/transform/patmat/MatchOptimization.scala src/compiler/scala/tools/nsc/typechecker/Typers.scala src/partest/scala/tools/partest/nest/ReflectiveRunner.scala src/reflect/scala/reflect/internal/Types.scala src/reflect/scala/reflect/runtime/JavaUniverse.scala test/files/run/inline-ex-handlers.check test/files/run/t6223.check test/files/run/t6223.scala test/scaladoc/scalacheck/IndexTest.scala
| * | | | | Merge pull request #2321 from kzys/js-deferAdriaan Moors2013-04-011-7/+0
| |\ \ \ \ \ | | | | | | | | | | | | | | Scaladoc: Load scripts at the bottom, and with a defer attribute
| | * | | | | Scaladoc: Load scripts at the bottom, and with a defer attributeKato Kazuyoshi2013-03-271-7/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | To improve latency on modern browsers (which supports defer) and old browsers: * https://www.webkit.org/blog/1395/running-scripts-in-webkit/ * http://developer.yahoo.com/blogs/ydn/posts/2007/07/high_performanc_5/
| * | | | | | Strip version suffix from diffutils.Adriaan Moors2013-03-291-1/+1
| | | | | | |
| * | | | | | Use java-diff-utils for diffing in partest.Adriaan Moors2013-03-293-492/+573
| | |_|_|_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We now use the unified diff format, hence the updated check files. It's not clear to me how partest's classpath is managed, but the approach in this commit works for the ant task and script invocation. The diffutils jar is injected in the parent classloader.
| * | | | | Merge pull request #2292 from retronym/ticket/7285Adriaan Moors2013-03-277-3/+164
| |\ \ \ \ \ | | | | | | | | | | | | | | SI-7285 Fix match analysis with nested objects
| | * | | | | SI-7285 Fix match analysis with nested objects.Jason Zaugg2013-03-236-4/+154
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The fix for SI-6146 introduced `nestedMemberType` to enumerate sealed subtypes based on the (prefixed) type of the scrutinee and the symbols of its sealed subclasses. That method needed to widen `ThisType(modSym)`s to `ModuleTypeRef(modSym)` before calling `asSeenFrom`. However, this could lead to confused in the match analysis, which sees `ModuleTypeRef` as distinct from singleton types on the same modules (after all, they aren't =:=). Spurious warnings ensued. This commit makes two changes: - conditionally re-narrow the result of `asSeenFrom` in `nestedMemberType`. - present `a.b.SomeModule.type` as `SomeModule` in warnings emitted by the pattern matcher.
| | * | | | | Expand test for SI-6124 to demonstrate cause of SI-7285.Jason Zaugg2013-03-232-3/+14
| | | | | | |
| * | | | | | Merge pull request #2291 from retronym/ticket/7290Adriaan Moors2013-03-274-0/+30
| |\ \ \ \ \ \ | | | | | | | | | | | | | | | | SI-7290 Discard duplicates in switchable alternative patterns.
| | * | | | | | SI-7290 Minor cleanups driven by review comments.Jason Zaugg2013-03-271-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - make a def a val, we only need to compute it once - add a clarifying comment - only report the first duplicate
| | * | | | | | SI-7290 Discard duplicates in switchable alternative patterns.Jason Zaugg2013-03-234-0/+30
| | |/ / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The pattern matcher must not allow duplicates to hit the backend when generating switches. It already eliminates then if they appear on different cases (with an unreachability warning.) This commit does the same for duplicated literal patterns in an alternative pattern: discard and warn.
| * | | | | | Merge pull request #2288 from paulp/pr/2273-with-editsPaul Phillips2013-03-272-0/+17
| |\ \ \ \ \ \ | | |_|/ / / / | |/| | | | | SI-6387 Clones accessor before name expansion
| | * | | | | SI-6387 Clones accessor before name expansionEugene Vigdorchik2013-03-252-0/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When a symbol's name is expanded due to a conflict during composition (e.g. multiple traits with same-named members, but which are not both visible at the language level in the concrete class) the compiler renames some symbols with expanded names which embed the full name of the declaring class to avoid clashes. In the rare cases when the accessor overrides the member in base class, such expansion either results in AbstractMethodError when the base method is abstract, or, even worse, can change the semantics of the program. To avoid such issues, we clone the accessor symbol, clear its ACCESSOR flag and enter the symbol with an unchanged name.
| * | | | | | Merge pull request #2270 from retronym/ticket/7246-2Paul Phillips2013-03-258-8/+87
| |\ \ \ \ \ \ | | | | | | | | | | | | | | | | SI-7246 Make $outer pointer elision Java aware
| | * | | | | | SI-7246 Make $outer pointer elision Java awareJason Zaugg2013-03-238-8/+87
| | |/ / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In e0853b3, a space-saving optimization elided the outer pointer of inner classes if the the (protected) outer pointer of the immediate parent class was guaranteed to point to the same instance. But, this check failed to account for Java parent classes, which don't follow the Scala scheme. This commit disables the optimization in that case. The original test case in e0853b3 was anemic, I've fleshed it out to: - test the presense or absense of $outer pointers with Java reflection - test the optimization works in the presense of aliased and annotated aliased types. (The former worked already, the latter required a change to the implementation.) - Test the negative case when the prefixes don't line up and the subclass in fact needs its own $outer. This patch is based on work by Euguene Vigdorchik with some additions by Jason Zaugg.
| * | | | | | Merge pull request #2306 from retronym/ticket/7299Paul Phillips2013-03-252-0/+13
| |\ \ \ \ \ \ | | | | | | | | | | | | | | | | SI-7299 Improve error message for eta-expanding 23+ param method
| | * | | | | | SI-7299 Improve error message for eta-expanding 23+ param methodJason Zaugg2013-03-252-0/+13
| | | |_|_|_|/ | | |/| | | | | | | | | | | | | | | | | | Before, we got `error: missing arguments for method f`.
| * | | | | | Merge pull request #2257 from JamesIry/2.10.x_classfile_51Paul Phillips2013-03-251-0/+126
| |\ \ \ \ \ \ | | | | | | | | | | | | | | | | Read version 51 (JDK 7) class files.
| | * | | | | | Read version 51 (JDK 7) class files.James Iry2013-03-141-0/+126
| | | |/ / / / | | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit makes the ClassFileReader/ICodeReader parse class files from JDK 7 (class file version 51). It does that by skipping over the method handle related entries in the constant pool and by doing some dummy processing on invoke dynamic instructions. The inliner is updated to not try to inline a method with an invoke dynamic instruction. A place holder INVOKE_DYNAMIC instruction is added to ICode but it is designed to create an error if there's ever any attempt to analyze it. Because the inliner is the only phase that ever tries to analyze ICode instructions not generated from Scala source and because Scala source will never emit an INVOKE_DYNAMIC, the place holder INVOKE_DYNAMIC should never cause any errors. A test is included that generates a class file with INVOKE_DYNAMIC and then compiles Scala code that depends on it.
| * | | | | | Merge pull request #2278 from kzys/jira-6580Paul Phillips2013-03-252-0/+43
| |\ \ \ \ \ \ | | | | | | | | | | | | | | | | SI-6580 Scaladoc: Should not close void elements
| | * | | | | | SI-6580 Scaladoc: Should not close void elementsKato Kazuyoshi2013-03-252-0/+43
| | | |/ / / / | | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Because it will generate a useless element like "</img>". To made matters worse, Scaladoc used to generate the element with attributes (like </img src="...">). That's why we had SI-6580.
| * | | | | | Merge pull request #2293 from retronym/ticket/6210Adriaan Moors2013-03-252-0/+22
| |\ \ \ \ \ \ | | |/ / / / / | |/| | | | | SI-6210 Test case for already-fixed pattern matcher bug
| | * | | | | SI-6210 Test case for already-fixed pattern matcher bugJason Zaugg2013-03-232-0/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The fix arrived in SI-6022 / #1100 / 2.10.0-M7.