summaryrefslogtreecommitdiff
path: root/test
Commit message (Collapse)AuthorAgeFilesLines
* Sanity for build.xml: exscriptus&positus delendus est.Adriaan Moors2013-03-231-0/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Reduced copy/pasting to the best of my antabilities. The next person to duplicate anything without written permission will be sentenced to a week in xmhell. While I was at it, made sure that layering is respected. The quick phase exclusively uses the locker compiler for building. The jar task will fail when trying to create an empty jar. Replaced the crazy if/unless/depends constructs by if/then/else. Version suffix computation should now be comprehensible. I threw in some validation to make sure the various suffixes are consistent. Also, no more init/pre-foo tasks unless absolutely necessary. Introduced a couple of macros to capture the essence of staged compilation. Notes: - remove lib.extra, standardize on aux.libs - collapse *.javac.path and *.build.path - rename starr.classpath to starr.compiler.path - only repl needs jline, locker.compiler.path = locker.comp.build.path + forkjoin - more uniform build.paths (compiler = reflect + library) - uniformity means slightly bigger classpaths (e.g. forkjoin is only used in library, but inherited by compiler) - pruned: some spurious dependencies removed - compilerpathref = compiler build path - silence test.osgi, by hook or by crook - centralized clean tasks - reduce duplication in property usage - fix pack.xml to pack scaladoc/partest instead of scaladoc/scala-partest - TODO: -XDignore.symbol.file necessary for library? only needed for forkjoin? - document usage from jenkins, fix typo: partest.scalac*_*opts New targets: - quick-opt - strap-opt - test.bc - test.osgi - test.osgi.comp - test.osgi.init - test.stability-opt Removed/replaced targets: - asm.clean asm.lib asm.start - bc.run - dist.latest dist.latest.unix dist.latest.win dist.start - docs.all docs.manmaker docs.pre-comp docs.pre-continuations-plugin - docs.pre-jline docs.pre-lib docs.pre-man docs.pre-partest docs.pre-scalap - forkjoin.clean forkjoin.lib forkjoin.pack forkjoin.start - graph.clean - init.build.nopatch.release init.build.patch.release init.build.release - init.build.snapshot init.build.suffix.done init.extra.tasks - init.fail.bad.jdk init.hasbuildnum init.hasmavensuffix init.jars - init.jars.check init.maven.jars init.maven.tasks init.osgi.suffix - init.osgi.suffix.final init.osgi.suffix.snapshot init.testjava6 - init.version.done init.version.git init.version.release init.version.snapshot - init.warn.jdk7 locker.pre-comp locker.pre-lib locker.pre-reflect - locker.unlock.comp locker.unlock.lib locker.unlock.pre-comp - locker.unlock.pre-lib locker.unlock.pre-reflect locker.unlock.reflect - osgi.clean osgi.test osgi.test.comp osgi.test.init - pack.clean pack.pre-bin pack.pre-comp pack.pre-lib pack.pre-partest - pack.pre-plugins pack.pre-reflect pack.pre-scalap pack.start - palo.comp palo.lib palo.pre-bin palo.pre-comp palo.pre-lib palo.pre-reflect - palo.reflect palo.start quick.pre-bin - quick.pre-comp quick.pre-interactive quick.pre-lib quick.pre-partest - quick.pre-plugins quick.pre-reflect quick.pre-repl quick.pre-scalacheck - quick.pre-scaladoc quick.pre-scalap - sbt.clean sbt.compile sbt.done sbt.libs sbt.start - starr.clean - strap.clean strap.pre-comp strap.pre-lib strap.pre-reflect strap.start - test.debug test.pre-run
* Merge pull request #2224 from retronym/ticket/7238Adriaan Moors2013-03-112-0/+13
|\ | | | | SI-7328 Bail out of names/defaults when args are error typed
| * SI-7328 Bail out of names/defaults if args are error typedJason Zaugg2013-03-092-0/+13
| | | | | | | | | | To avoid a crasher later on with a null type inside a sequence argument.
* | Merge pull request #2225 from retronym/ticket/7234Adriaan Moors2013-03-112-0/+35
|\ \ | | | | | | SI-7234 Make named args play nice with dep. method types
| * | SI-7234 Make named args play nice with dep. method typesJason Zaugg2013-03-092-0/+35
| | | | | | | | | | | | | | | | | | Some care is needed to avoid interaction with constant types (e.g pos/z1730.scala) and with existentials (e.g. t3507-old.scala).
* | | Merge pull request #2221 from scalamacros/ticket/5710Adriaan Moors2013-03-114-0/+32
|\ \ \ | | | | | | | | SI-5710 has fixed itself
| * | | SI-5710 has fixed itselfEugene Burmako2013-03-094-0/+32
| | | | | | | | | | | | | | | | My job here is only to submit tests.
* | | | Merge pull request #2223 from scalamacros/ticket/7235Adriaan Moors2013-03-114-0/+36
|\ \ \ \ | | | | | | | | | | reifier is now aware of SI-7235
| * | | | reifier is now aware of SI-7235Eugene Burmako2013-03-094-0/+36
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | SI-7235 is caused by a long-standing todo in typedRefinement, which leads to originals of compound type trees swallowing their stats. I'm not sure how exactly to fix SI-7235, but what I am sure about is that we shouldn't silently discard stats during reification. This patch introduces a new implementation restrictions, which now reports that reify of compound type trees with non-empty stats isn't going to work.
* | | / SI-7226 Fix inference regression caused by TypeVar equality.Jason Zaugg2013-03-091-0/+26
| |_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | TypeVars, being mutable creatures, mustn't have structural equality/hashing, otherwise TypeRefs that differ only by having distinct TypeVars as components get wrongly uniqued together. The reported bug showed the disaterous consequences: constraints from the `C?[Int]` in the return type applied to the `?C[?A]` in the parameter list. This commit overrides `equals` and `hashCode` in `TypeVar` to use reference equality. An alternative fix would be to drop the `case`-ness of the class, as was the case before 0cde930b when this regressed.
* | | Fix SI-7224.Iulian Dragos2013-03-072-1/+168
| |/ |/| | | | | | | | | | | Don't focus positions assigned to the TypeTree of a parent of a Template when the parent exists in the source. A focused position (instance of `OffsetPosition`) makes it invisible to the presentation compiler when it looks for the innermost enclosing tree of a given position (breaking hyperlinking, for example).
* | Merge pull request #2199 from retronym/ticket/7214Adriaan Moors2013-03-051-0/+57
|\ \ | | | | | | SI-7214 outer check based on dealiased pattern type.
| * | SI-7214 outer check based on dealiased pattern type.Jason Zaugg2013-03-051-0/+57
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A Typed Pattern (_: T) is more than `.isInstanceOf`: if `T` is a path dependent type, the scrutinee's $outer reference is also compared against the prefix of `T`. The code that synthesises this is split into two places. `needsOuterCheck` determines whether to add this check, based on the type `T`, and the type of the scrutinee. If it gives the go-ahead, `treeCondStrategy.outerCheck` synthesizes the check. The new test case demonstrates the problems caused by the failure to dealias in `needsOuterCheck`: it could either wrongly lead to synthesis of an outer test (which would crash), or wrongly omit the outer test (meaning overly liberal matching.) A simple `dealias` remedies this. `dealiasWiden` is *not* appropriate here; we need to keep hold of singleton types. I'll also note that there is already a little slack between these methods, as commented: > ExplicitOuter replaces `Select(q, outerSym) OBJ_EQ expectedPrefix` > by `Select(q, > outerAccessor(outerSym.owner)) OBJ_EQ expectedPrefix` > if there's an outer accessor, otherwise the condition becomes `true` > TODO: can we improve needsOuterTest so there's always an outerAccessor? So this is probably a fragile area that warrants a careful review with a view to design improvements.
* | | Merge pull request #2156 from vigdorchik/hierarchyAdriaan Moors2013-03-056-84/+106
|\ \ \ | | | | | | | | SI-7109 SI-7153 Generalize the API to get docComments: allow to force do...
| * | | SI-7109 SI-7153 Generalize the API to get docComments: allow to force docTreesEugene Vigdorchik2013-02-246-84/+106
| | | | | | | | | | | | | | | | | | | | | | | | for given fragments. Don't type-check when forcing doc comments, but rather do it directly. Test the new functionality as well as better tests for the old one.
* | | | Merge pull request #2193 from adriaanm/patmat-refactorAdriaan Moors2013-03-056-63/+25
|\ \ \ \ | | | | | | | | | | merge 2.10.1 into 2.10.x
| * \ \ \ Merge 2.10.1 into 2.10.xAdriaan Moors2013-03-034-63/+11
| |\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The fix for SI-7183 in 440bf0a8c2 was forward ported in f73d50f46c. Conflicts: src/compiler/scala/tools/nsc/typechecker/PatternMatching.scala
| | * | | | [nomaster] SI-7195 minor version mustn't introduce warningsAdriaan Moors2013-03-013-63/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We want 2.10.1 to be a drop-in replacement for 2.10.0, so we can't start warning where we weren't warning in 2.10.0. See SI-5954 (#1882, #2079) for when it was an implementation restriction, which was then weakened to a warning. It's now hidden behind -Ydebug.
| | * | | | Merge pull request #2168 from retronym/ticket/7183Adriaan Moors2013-03-012-0/+14
| | |\ \ \ \ | | | | | | | | | | | | | | SI-7183 Disable unreachability for withFilter matches.
| | | * | | | SI-7183 Disable unreachability for withFilter matches.Jason Zaugg2013-02-252-0/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This avoids spurious unreachable warnings on code that the user didn't write. The parser desugars for-comprehensions such as: for (A(a) <- List(new A)) yield a To: List(new A()).withFilter(((check$ifrefutable$2) => check$ifrefutable$2: @scala.unhecked match { case A((a @ _)) => true case _ => false }) ) But, if `A.unapply` returns `Some[_]`, the last case is dead code. (Matching against a regular case class *would* fall through in the caes of a null scrutinee.) In SI-6902, we enabled unreachability warnings, even if the scrutinee was annotated as @unchecked. That was consistent with the 2.9.2 behaviour, it was only disabled temporarily (actually, accidentally) in 2.10.0. But, the old pattern matcher didn't warn about this code. This commit makes the pattern matcher recognise the special scrutinee based on its name and disables both exhaustivity *and* unreachability analysis. To do so, the we generalize the boolean flag `unchecked` to the class `Suppression`.
| | * | | | | Merge pull request #2167 from retronym/ticket/7126Adriaan Moors2013-03-011-0/+11
| | |\ \ \ \ \ | | | | | | | | | | | | | | | | SI-7126 Account for the alias types that don't dealias.
| | | * | | | | SI-7126 Account for the alias types that don't dealias.Jason Zaugg2013-02-251-0/+11
| | | |/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | After this change: qbin/scalac -Ydebug test/files/pos/t7126.scala 2>&1 | grep warning warning: dropExistential did not progress dealiasing Test.this.T[Test.this.T], see SI-7126 one warning found T[T]? Really? The true bug lies somewhere else; the comments of the ticket illuminate the general areas of concern.
| * | | | | / [port] SI-7183 Disable unreachability for withFilter matches.Adriaan Moors2013-03-032-0/+14
| | |_|_|_|/ | |/| | | | | | | | | | | | | | | | | | | | | | This is a forward port of #2168 (originally for 2.10.1, but the pattern matcher has since been refactored in 2.10.x.)
* | | | | | Merge pull request #2198 from retronym/ticket/7215Paul Phillips2013-03-051-0/+6
|\ \ \ \ \ \ | | | | | | | | | | | | | | SI-7215 Fix transpose of an empty Array[Array[T]].
| * | | | | | SI-7215 Fix transpose of an empty Array[Array[T]].Jason Zaugg2013-03-051-0/+6
| | |_|_|_|/ | |/| | | |
* | | | | | Merge pull request #2175 from retronym/ticket/7185Paul Phillips2013-03-054-0/+56
|\ \ \ \ \ \ | | | | | | | | | | | | | | SI-7185 Avoid NPE in TreeInfo.isExprSafeToInline
| * | | | | | SI-7185 Avoid NPE in TreeInfo.isExprSafeToInlineJason Zaugg2013-03-024-0/+56
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We got there typechecking code with a redundant layer of Block. We can't express that in source code, so we test this with manual tree construction and with XML literals, which as reported produce such trees.
* | | | | | | Merge pull request #2178 from scalamacros/ticket/7190Paul Phillips2013-03-051-0/+26
|\ \ \ \ \ \ \ | |_|_|/ / / / |/| | | | | | SI-7190 macros no longer give rise to bridges
| * | | | | | SI-7190 macros no longer give rise to bridgesEugene Burmako2013-02-271-0/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Amazingly enough, this got through all the testing we performed. But now erasure knows that it shouldn't generate bridges for macro methods.
* | | | | | | Merge pull request #2184 from adriaanm/revert-pr-2083Adriaan Moors2013-03-018-2071/+0
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | Revert SI-6240 synchronization for runtime reflection
| * | | | | | | Revert SI-6240 synchronization for runtime reflectionAdriaan Moors2013-03-018-2071/+0
| | |_|/ / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit reverts #2083: - 387b2590db runtime reflection: death from thousand threads - 73d079fb38 removes the assertion in missingHook - f4dd56ca5d synchronizes names - dd148de5a8 synchronizes pendingVolatiles - 4cbb9357c5 synchronizes toolboxes - 07bcb6176a SI-7045 reflection now auto-initializes selfType - bebd62d566 optimizes Scala reflection GIL - 735634f1d6 initializes lazy vals and inner objects in advance - 5b37cfb19a introduces GIL to Scala reflection - 981da8edfc cleans up initialization of runtime reflection - b2c2493b22 reflection no longer uses atPhase and friends - a9dca512d8 synchronizes symbols - 0262941b3c removes the crazy extraneous log - 21d5d3820b moves Symbol#SymbolKind to Symbols
* | | | | | | Merge pull request #2179 from adriaanm/merge-2.10.1Adriaan Moors2013-03-019-55/+119
|\ \ \ \ \ \ \ | |/ / / / / / |/| | | | | | Merge 2.10.1 into 2.10.x
| * | | | | | Merge 2.10.1 into 2.10.x.Adriaan Moors2013-02-279-55/+119
| |\ \ \ \ \ \ | | | |_|/ / / | | |/| | | |
| | * | | | | Merge pull request #2160 from scalamacros/topic/7112-followup-2101v2.10.1-RC2Adriaan Moors2013-02-251-1/+1
| | |\ \ \ \ \ | | | | | | | | | | | | | | | | fixes the test for SI-7112
| | | * | | | | fixes the test for SI-7112Eugene Burmako2013-02-231-1/+1
| | | | |_|/ / | | | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Freshly released Java 1.6.0_41 for OSX fails with "IllegalAccessError: tried to access class JavaSimpleEnumeration_1 from class sun.proxy.$Proxy6", and rightfully so, because that class isn't public. I think I will avoid the usual "how could this even work before" in this commit message.
| | * / | | | SI-7180 Fix regression in implicit scope of HK type alias.Jason Zaugg2013-02-251-0/+13
| | |/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We actually need to call normalize here, otherwise we don't progress through #1 below. [infer implicit] scala.this.Predef.implicitly[Higher[Foo.Bar]] with pt=Higher[Foo.Bar] in object Foo 1. tp=Foo.Bar tp.normalize=[A <: <?>]Foo.Bar[A] tp.dealias=Foo.Bar 2. tp=Foo.Bar[A] tp.normalize=Box[A] tp.dealias=Box[A]
| | * | | | Merge pull request #2152 from retronym/topic/annotatedRetyping-2.10.1Adriaan Moors2013-02-214-0/+82
| | |\ \ \ \ | | | | | | | | | | | | | | SI-7163 backport of annotated retyping to 2.10.1
| | | * | | | Additional test case for Lukas' fix to annotated originals.Jason Zaugg2013-02-212-0/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This was inspired by the regression that Mark encountered when upgrading SBT from 2.10.0 to 2.10.1-RC1.
| | | * | | | Fix typing idempotency bug with Annotated treesLukas Rytz2013-02-212-0/+68
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | typedAnnotated transforms an Annotated tree into a Typed tree. The original field of the result is set to the Annotated tree. The bug was that typedAnnotated was using the untyped Annotated tree as original, but also set its type. When re-typing later on the same Annotated tree, the typer would consider it as alreadyTyped. This is incorrect, the typer needs to convert Annotated trees to Typed. Also, the Annotated tree only had its type field set, but its children were still untyped. This crashed the compiler lateron, non-typed trees would get out of the typing phase.
| | * | | | | SI-7146 - Fixing checkinit bug in ExecutionContextImpl and adding testViktor Klang2013-02-192-0/+28
| | | | | | |
| | * | | | | SI-7128 Fix regression in copyToArray for empty arraysJason Zaugg2013-02-141-0/+3
| | |/ / / /
| | * | | | [nomaster] Revert "SI-6548 reflection now correctly enters jinners"Adriaan Moors2013-02-104-40/+75
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 54a84a36d5b435a787d93ca48d45399136c7e162. This is necessary to maintain binary compatibility with 2.10.0. run/t6989.check had to be updated as it also (indirectly) tested SI-6548 Conflicts: test/files/lib/javac-artifacts.jar.desired.sha1 test/files/run/t6548.check test/files/run/t6548/Test_2.scala
| | * | | | [nomaster] Revert "SI-4664 Make scala.util.Random Serializable"Adriaan Moors2013-02-091-15/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Also revert "SI-4664 [Make scala.util.Random Serializable] Add test case" This reverts commit 0b92073a38f9d1823f051ac18173078bfcfafc8a. This reverts commit 2aa66bec86fd464712b0d15251cc400ff9d52821. This is necessary to maintain binary compatibility with 2.10.0.
* | | | | | Merge pull request #2083 from scalamacros/ticket/6240Adriaan Moors2013-02-278-0/+2071
|\ \ \ \ \ \ | |/ / / / / |/| | | | | SI-6240 synchronization for runtime reflection
| * | | | | runtime reflection: death from thousand threadsEugene Burmako2013-02-114-0/+2051
| | | | | | | | | | | | | | | | | | | | | | | | not anymore
| * | | | | SI-7045 reflection now auto-initializes selfTypeEugene Burmako2013-02-112-0/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | selfType joins the happy family of flags, annotations and privateWithin, which automatically trigger initialization, when used within runtime reflection.
| * | | | | removes the crazy extraneous logEugene Burmako2013-02-112-0/+6
| |/ / / /
* | | | | Merge pull request #2134 from scalamacros/topic/resetattrs-thisPaul Phillips2013-02-272-0/+12
|\ \ \ \ \ | |_|/ / / |/| | | | resetAttrs now always erases This.tpe
| * | | | resetAttrs now always erases This.tpeEugene Burmako2013-02-172-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The symbol of This, if it points to a package class, isn't touched, just as usual, so that our Select(Select(Select(...))) => This(...) optimization works fine with attr reset. However the tpe is now erased, so that subsequent reflective compilation doesn't spuriously fail when seeing that some subtrees of a tree being compiled are typed. Erasing the tpe doesn't pose even a tiniest problem, because, as it can be seen in typedThis, type is trivially reconstructed from the symbol.
* | | | | Merge pull request #2149 from khernyo/issue/7074Grzegorz Kossakowski2013-02-252-0/+24
|\ \ \ \ \ | | | | | | | | | | | | SI-7074 Fix xml attribute sorting