summaryrefslogtreecommitdiff
path: root/test/files/run
Commit message (Collapse)AuthorAgeFilesLines
* Cleanup in module var creation.Paul Phillips2012-12-122-6/+10
| | | | | | | | | | | | When all the logic in a method is for symbol creation, and then at the last minute it throws on a hastily zipped ValDef, it's really not a tree generation method, it's a symbol creation method. Eliminated redundancy and overgeneralization; marked some bits for further de-duplication. Did my best with my limited archeological skills to document what is supposed to be happening in eliminateModuleDefs.
* Merge branch 'merge-wip-into-2.10.x' into merge-2.10-into-masterPaul Phillips2012-12-1153-47/+514
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * merge-wip-into-2.10.x: (44 commits) Cleanups of reifyBoundTerm and reifyBoundType SI-5841 reification of renamed imports Share the empty LinkedList between first0/last0. SI-4922 Show default in Scaladoc for generic methods. SI-6614 Test case for fixed ArrayStack misconduct. SI-6690 Release reference to last dequeued element. SI-5789 Use the ReplTest framework in the test SI-5789 Checks in the right version of the test SI-5789 Removes assertion about implclass flag in Mixin.scala SI-6766 Makes the -Pcontinuations:enable flag a project specific preference more ListOfNil => Nil DummyTree => CannotHaveAttrs evicts assert(false) from the compiler introduces global.pendingSuperCall refactors handling of parent types unifies approaches to call analysis in TreeInfo TypeApply + Select and their type-level twins SI-6696 removes "helper" tree factory methods SI-6766 Create a continuations project in eclipse Now the test suite runs MIMA for compatibility testing. ... Conflicts: src/compiler/scala/reflect/reify/codegen/GenUtils.scala src/compiler/scala/tools/nsc/ast/Trees.scala src/compiler/scala/tools/nsc/backend/icode/GenICode.scala src/compiler/scala/tools/nsc/backend/jvm/GenASM.scala src/compiler/scala/tools/nsc/backend/jvm/GenJVM.scala src/compiler/scala/tools/nsc/typechecker/Contexts.scala src/compiler/scala/tools/nsc/typechecker/Namers.scala src/compiler/scala/tools/nsc/typechecker/Typers.scala src/eclipse/scala-compiler/.classpath src/eclipse/scalap/.classpath src/reflect/scala/reflect/internal/StdNames.scala src/reflect/scala/reflect/internal/TreeInfo.scala
| * Merge pull request #1752 from scalamacros/ticket/5841Adriaan Moors2012-12-1114-0/+132
| |\ | | | | | | Ticket/5841
| | * SI-5841 reification of renamed importsAndriy Polishchuk2012-12-1114-0/+132
| | | | | | | | | | | | | | | | | | Reification of renamed imports is done by catching Selects with name != their tree.symbol.name, replacing this name with tree.symbol.name, and then doing reifyProduct in case of renamed terms and reifyBoundType (inner) in case of renamed types.
| * | Merge pull request #1733 from retronym/ticket/6614Adriaan Moors2012-12-102-0/+19
| |\ \ | | | | | | | | SI-6614 Test case for fixed ArrayStack misconduct.
| | * | SI-6614 Test case for fixed ArrayStack misconduct.Jason Zaugg2012-12-082-0/+19
| | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Not sure when it was fixed, but in 2.9.2 things were messed up: scala> (for (i <- 0 to 10) yield { val in = ArrayStack.tabulate(i)(_.toString); (in, (in filter (_ => true)) == in) }).mkString("\n") res14: String = (ArrayStack(),true) (ArrayStack(0),true) (ArrayStack(0, 1),true) (ArrayStack(1, 2, null),false) (ArrayStack(0, 1, 2, 3),true) (ArrayStack(3, 4, null, null, null),false) (ArrayStack(2, 3, 4, 5, null, null),false) (ArrayStack(1, 2, 3, 4, 5, 6, null),false) (ArrayStack(0, 1, 2, 3, 4, 5, 6, 7),true) (ArrayStack(7, 8, null, null, null, null, null, null, null),false) (ArrayStack(6, 7, 8, 9, null, null, null, null, null, null),false)
| * | Merge pull request #1732 from retronym/ticket/6690Adriaan Moors2012-12-101-0/+62
| |\ \ | | | | | | | | SI-6690 Release reference to last dequeued element.
| | * | SI-6690 Release reference to last dequeued element.Jason Zaugg2012-12-081-0/+62
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Avoids leaks in MutableList and its more better known child, mutable.Queue, when the last element is dequeued or when we take the tail of a one element collection. Refactors copy/pasted code between the two implementations of tail.
| * | | Merge pull request #1729 from JamesIry/SI-5789-2_2.10.xAdriaan Moors2012-12-102-0/+28
| |\ \ \ | | | | | | | | | | SI-5789 Removes assertion about implclass flag in Mixin.scala
| | * | | SI-5789 Use the ReplTest framework in the testJames Iry2012-12-072-21/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Don't check for the crashed message, just dump the output from the REPL. Use the ReplTest framework to the make the test clean
| | * | | SI-5789 Checks in the right version of the testJames Iry2012-12-071-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In my other commit I had a version of the test that didn't actually reproduce the problem because it didn't set the optimize flag
| | * | | SI-5789 Removes assertion about implclass flag in Mixin.scalaJames Iry2012-12-072-0/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The assertion that the class being mixed from should be an implclass seems reasonable, but the flag isn't always set. In order to stop the bleeding this fix turns the assertion into a debug warning. Issue SI-6782 will track figuring out the root cause of the missing flag.
| * | | | Merge pull request #1713 from retronym/ticket/5894Adriaan Moors2012-12-101-0/+17
| |\ \ \ \ | | | | | | | | | | | | SI-5894 Don't emit static forwarders for macros.
| | * | | | SI-5894 Don't emit static forwarders for macros.Jason Zaugg2012-12-051-0/+17
| | | |/ / | | |/| |
| * | | | Merge pull request #1711 from retronym/ticket/1672Adriaan Moors2012-12-101-0/+28
| |\ \ \ \ | | | | | | | | | | | | SI-1672 Catches are in tail position without finally.
| | * | | | Addtional test cases for tail calls in catches.Jason Zaugg2012-12-051-0/+28
| | |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | - Includes a run test to check bytecode verifies and behaves - Show this isn't possible when try is used as an expression, and a `liftedTree` local method is needed.
| * | | | Merge pull request #1699 from retronym/ticket/6549Adriaan Moors2012-12-102-0/+54
| |\ \ \ \ | | |_|_|/ | |/| | | SI-6549 Improve escaping in REPL codegen.
| | * | | SI-6549 Improve escaping in REPL codegen.Jason Zaugg2012-12-032-0/+54
| | |/ / | | | | | | | | | | | | | | | | | | | | | | | | - Escape the LHS of an assign when printing results - e.g. X("").foo = bar - Escape val names - e.g. val `"` = 0`
| * | | Merge pull request #1668 from scalamacros/topic/pre-typemacrosAdriaan Moors2012-12-072-5/+5
| |\ \ \ | | | | | | | | | | refactors handling of parent types
| | * | | introduces global.pendingSuperCallEugene Burmako2012-12-061-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Similarly to global.emptyValDef, which is a dummy that stands for an empty self-type, this commit introduces global.pendingSuperCall, which stands for a yet-to-be-filled-in call to a superclass constructor. pendingSuperCall is emitted by Parsers.template, treated specially by Typers.typedParentType and replaced with a real superclass ctor call by Typers.typedTemplate. To avoid copy/paste, this commit also factors out and unifies dumminess of EmptyTree, emptyValDef and pendingSuperCall - they all don't have a position and actively refuse to gain one, same story for tpe.
| | * | | refactors handling of parent typesEugene Burmako2012-12-061-3/+3
| | | |/ | | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | At the moment parser does too much w.r.t handling of parent types. It checks whether a parent can have value arguments or not and more importantly, it synthesizes constructors and super calls. This approach is fundamentally incompatible with upcoming type macros. Take for example the following two snippets of code: `class C extends A(2)` `class D extends A(2) with B(3)` In the first snippet, `A` might be a type macro, therefore the super call `A.super(2)` eagerly emitted by the parser might be meaningless. In the second snippet parser will report an error despite that `B` might be a type macro which expands into a trait. Unfortunately we cannot simply augment the parser with the `isTypeMacro` check. This is because to find out whether an identifier refers to a type macro, one needs to perform a typecheck, which the parser cannot do. Therefore we need a deep change in how parent types and constructors are processed by the compiler, which is implemented in this commit.
| * / | SI-6696 removes "helper" tree factory methodsEugene Burmako2012-12-0629-42/+42
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | As experience shows, these methods can easily be a source of confusion for the newcomers: https://issues.scala-lang.org/browse/SI-6696. I'm only leaving the TypeTree(tp) factory, since the facility to set underlying types for type trees is not exposed in the public API, as it's inherently mutable.
| * | Merge pull request #1690 from retronym/ticket/6631Adriaan Moors2012-12-061-0/+18
| |\ \ | | | | | | | | SI-6631 Handle invalid escapes in string interpolators
| | * | SI-6631 Handle invalid escapes in string interpolatorsJason Zaugg2012-12-021-0/+18
| | |/ | | | | | | | | | Patch contributed by Rex Kerr.
| * | Merge pull request #1702 from scalamacros/topic/idempotencyEugene Burmako2012-12-0512-0/+241
| |\ \ | | | | | | | | tests for idempotency issues in the typechecker
| | * | tests for idempotency issues in the typecheckerEugene Burmako2012-12-0412-0/+241
| | | | | | | | | | | | | | | | | | | | | | | | | | | | For more details see https://issues.scala-lang.org/browse/SI-5464. Check files are intentionally very precise, so that we can monitor how the situation changes over time.
* | | | Merge pull request #1719 from andriyp/ticket/5841-cleanPaul Phillips2012-12-1014-0/+132
|\ \ \ \ | | | | | | | | | | SI-5841 reification of renamed imports
| * | | | SI-5841 reification of renamed importsAndriy Polishchuk2012-12-0614-0/+132
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Reification of renamed imports is done by catching Selects with name != their tree.symbol.name, replacing this name with tree.symbol.name, and then doing reifyProduct in case of renamed terms and reifyBoundType (inner) in case of renamed types.
* | | | | Merge pull request #1697 from retronym/ticket/6745-2Adriaan Moors2012-12-061-0/+22
|\ \ \ \ \ | | | | | | | | | | | | Don't return unimportables from importedSymbol.
| * | | | | Don't return unimportables from importedSymbol.Jason Zaugg2012-12-031-0/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Hardening against the symptom of SI-6745, which yielded: wat.scala:4: error: too many arguments for constructor Predef: ()object Predef def this() = this(0) ^ The fix for the underlying problem in that bug has been targetted at branch 2.10.x.
* | | | | | Merge branch 'merge-2.10-wip' into merge-2.10Paul Phillips2012-12-0521-4/+428
|\ \ \ \ \ \ | |/ / / / / |/| | / / / | | |/ / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * merge-2.10-wip: Fixing OSGi distribution. Fix for rangepos crasher. SI-6685 fixes error handling in typedApply Test cases for SI-5726, SI-5733, SI-6320, SI-6551, SI-6722. Asserts about Tree qualifiers. Fix for SI-6731, dropped trees in selectDynamic. neg test added SI-5753 macros cannot be loaded when inherited from a class or a trait Take advantage of the margin stripping interpolator. Adds a margin stripping string interpolator. SI-6718 fixes a volatile test Mark pattern matcher synthetics as SYNTHETIC. Set symbol flags at creation. Fix for SI-6687, wrong isVar logic. Fix for SI-6706, Symbol breakage under GC. findEntry implementation code more concise and DRYer. Fix for SI-6357, cycle with value classes. Refactoring of adaptMethod SI-6677 Insert required cast in `new qual.foo.T` Conflicts: src/compiler/scala/tools/nsc/transform/Erasure.scala src/compiler/scala/tools/nsc/typechecker/Typers.scala src/reflect/scala/reflect/internal/SymbolTable.scala src/reflect/scala/reflect/internal/util/package.scala test/files/neg/gadts1.check
| * | | | Merge pull request #1681 from paulp/issue/6731Adriaan Moors2012-12-056-0/+264
| |\ \ \ \ | | |_|_|/ | |/| | | Fix for SI-6731, dropped trees in selectDynamic.
| | * | | Test cases for SI-5726, SI-5733, SI-6320, SI-6551, SI-6722.Paul Phillips2012-11-294-0/+81
| | | | | | | | | | | | | | | | | | | | | | | | | All tickets involving selectDynamic fixed by the prior commit. It also fixes SI-6663, but that already has a test case.
| | * | | Fix for SI-6731, dropped trees in selectDynamic.Paul Phillips2012-11-282-0/+183
| | | | | | | | | | | | | | | | | | | | I rewrote mkInvoke entirely, and boosted the test coverage.
| * | | | Merge pull request #1678 from martende/ticket/5753Eugene Burmako2012-11-298-0/+32
| |\ \ \ \ | | | | | | | | | | | | SI-5753 macros cannot be loaded when inherited from a class or a trait
| | * | | | SI-5753 macros cannot be loaded when inherited from a class or a traitmartende2012-11-278-0/+32
| | | |_|/ | | |/| | | | | | | | | | | | | | | | | enclClass should be taken from Tree otherwise we can jump to declaration class/trait.
| * | | | Merge pull request #1676 from retronym/topic/sm-interpolatorPaul Phillips2012-11-281-0/+41
| |\ \ \ \ | | |_|/ / | |/| | | Adds a margin stripping string interpolator.
| | * | | Adds a margin stripping string interpolator.Jason Zaugg2012-11-261-0/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently only for compiler internal use. Designed to avoid surprises if the interpolated values themselves contain the margin delimiter. Before: val bip = "\n |.." s"""fooo |bar $bip |baz""".stripMargin "fooo bar .. baz" After: sm"""fooo |bar $bip |baz""" "fooo bar |.. baz"
| * | | | Merge pull request #1674 from scalamacros/topic/showrawJosh Suereth2012-11-272-4/+6
| |\ \ \ \ | | |_|/ / | |/| | | SI-6718 fixes a volatile test
| | * | | SI-6718 fixes a volatile testEugene Burmako2012-11-262-4/+6
| | | | |
| * | | | Merge pull request #1665 from paulp/issue/6687Adriaan Moors2012-11-251-0/+10
| |\ \ \ \ | | | | | | | | | | | | Fix for SI-6687, wrong isVar logic.
| | * | | | Fix for SI-6687, wrong isVar logic.Paul Phillips2012-11-241-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fields which back lazy vals need to be excluded via !isLazy lest isVar return true.
| * | | | | Merge pull request #1663 from paulp/merge-2.10.wip-xAdriaan Moors2012-11-2515-27/+178
| |\ \ \ \ \ | | | | | | | | | | | | | | Merge 2.10.0-wip into 2.10.x.
| * \ \ \ \ \ Merge pull request #1643 from retronym/ticket/6677Adriaan Moors2012-11-252-0/+61
| |\ \ \ \ \ \ | | | | | | | | | | | | | | | | SI-6677 Insert required cast in `new qual.foo.T`
| | * | | | | | SI-6677 Insert required cast in `new qual.foo.T`Jason Zaugg2012-11-182-0/+61
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Short version: we sometimes need to rewrite this as new T(qual.asInstanceOf[OwnerOfFoo].foo) Long version: `adaptMember` in Erasure performs a few tasks, among them: 1. adding an empty argument list to qualifiers in `new qual.T` for which `qual` is a val template member that has (post uncurry) a MethodType with an empty parameter list. The same rewriting was already applied in uncurry for such qualifiers appearing in other contexts, e.g. `qual.foo` was already rewritten to `qual().foo`. 2. casting, if necessary, the qualifier in `Select(qual, name)` to the type of owner of the symbol that this selection references. This can be neccesary with compound types: - some val class member has type `A with B`; - we instantiate `new ab.valMemberOfB.T` - we must pass `ab.valMemberOfB` to the constructor of `T` as the `$outer` pointer - we must cast `ab` to `B` before calling `valMemberOfB`. Failure to insert this cast can lead to a LinkageError or a VerifyError. However, if 1) was performed, 2) was not. The error is pretty easy to trigger with the new reflection API: class Test { val cm: reflect.runtime.universe.Mirror = reflect.runtime.currentMirror def error { new cm.universe.Traverser // java.lang.VerifyError } def okay1 { val cm: reflect.runtime.universe.Mirror = reflect.runtime.currentMirror new cm.universe.Traverser } } The fix applied here to `adaptMember` mirrors the existing implementation of `adaptType`.
| * | | | | | | Fix for SI-6706, Symbol breakage under GC.Paul Phillips2012-11-231-0/+14
| | |_|/ / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Ensure the map key and the String in the Symbol are the same reference by removing the old key before updating the map with the new key -> symbol relation.
* | | | | | | Disabled part of a test.Paul Phillips2012-11-252-25/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Hmmm, the giant blob of binary data embedded in a test suddenly stopped working. What does one do in this spot.
* | | | | | | Merge branch 'merge-2.10.wip-x' into merge-2.10.x-masterPaul Phillips2012-11-2325-25/+411
|\ \ \ \ \ \ \ | | |_|/ / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * merge-2.10.wip-x: (24 commits) SI-6023 reify abstract vals Removing controversial `either` method from Futures API. SI-6695 Test case for fixed Array match bug adds comments to standard attachments SI-6673 fixes macro problems with eta expansions Restore the opimization apparently lost after merge. SI-6624 set info of case pattern binder to help find case field accessors Scaladoc update for collection.mutable.MultiMap SI-6663: don't ignore type parameter on selectDynamic invocation SI-6551: don't insert apply call in polymorphic expression. SI-6634 Fixes data corruption issue in ListBuffer#remove Fixes SI-6628, Revert "Fix for view isEmpty." SI-6661 - Remove obsolete implicit parameter of scala.concurrent.promise method Fixes SI-6150 - backport to 2.10.x branch. SI-5330, SI-6014 deal with existential self-type Fixes SI-6559 - StringContext not using passed in escape function. SI-6648 copyAttrs must preserve TypeTree#wasEmpty Fix raw string interpolator: string parts which were after the first argument were still escaped sane printing of renamed imports SI-6440 Address regressions around MissingRequirementError ... Conflicts: src/library/scala/collection/generic/IndexedSeqFactory.scala src/library/scala/collection/mutable/ListBuffer.scala src/reflect/scala/reflect/internal/Symbols.scala src/reflect/scala/reflect/internal/Types.scala test/files/run/t6150.scala
| * | | | | | Merge remote-tracking branch 'origin/2.10.0-wip' into merge-2.10.wip-xPaul Phillips2012-11-2315-27/+178
| |\ \ \ \ \ \ | | |/ / / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | # By Jason Zaugg (8) and others # Via Adriaan Moors (6) and Josh Suereth (5) * origin/2.10.0-wip: Removing controversial `either` method from Futures API. SI-6624 set info of case pattern binder to help find case field accessors Fixes SI-6628, Revert "Fix for view isEmpty." SI-6661 - Remove obsolete implicit parameter of scala.concurrent.promise method Fixes SI-6559 - StringContext not using passed in escape function. SI-6648 copyAttrs must preserve TypeTree#wasEmpty Fix raw string interpolator: string parts which were after the first argument were still escaped Update comment. SI-6646 `ident` or Ident is always new binding. SI-6440 Address regressions around MissingRequirementError Refine the message and triggering of MissingRequirementError. SI-6640 Better reporting of deficient classpaths. SI-6644 Account for varargs in extmethod forwarder SI-6646 Fix regression in for desugaring. Update tools/epfl-publish
| | * | | | | Merge pull request #1607 from retronym/ticket/6640Josh Suereth2012-11-198-25/+131
| | |\ \ \ \ \ | | | | | | | | | | | | | | | | SI-6640 Better reporting of deficient classpaths.