summaryrefslogtreecommitdiff
path: root/test/files
Commit message (Collapse)AuthorAgeFilesLines
* SI-6548 reflection now correctly enters jinnersEugene Burmako2012-12-073-1/+15
| | | | | | | | | | | | | | | | | | | When completing Java classes, runtime reflection enumerates their fields, methods, constructors and inner classes, loads them and enters them into either the instance part (ClassSymbol) or the static part (ModuleSymbol). However unlike fields, methods and constructors, inner classes don't need to be entered explicitly - they are entered implicitly when being loaded. This patch fixes the double-enter problem, make sure that enter-on-load uses the correct owner, and also hardens jclassAsScala against double enters that can occur in a different scenario. Since the fix is about Java-compiled classes, the test needs *.class artifacts produced by javac. Therefore I updated javac-artifacts.jar to include the new artifacts along with their source code.
* 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 #1681 from paulp/issue/6731Adriaan Moors2012-12-059-1/+293
|\ \ \ | | | | | | | | Fix for SI-6731, dropped trees in selectDynamic.
| * | | Test cases for SI-5726, SI-5733, SI-6320, SI-6551, SI-6722.Paul Phillips2012-11-297-1/+110
| | | | | | | | | | | | | | | | | | | | 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 #1682 from paulp/assert-about-qualifierPaul Phillips2012-12-031-2/+2
|\ \ \ \ | |_|_|/ |/| | | Asserts about Tree qualifiers.
| * | | Asserts about Tree qualifiers.Paul Phillips2012-11-291-2/+2
| | | | | | | | | | | | | | | | | | | | Encoding recent revelations about certain tree invariants in the form of asserts.
* | | | Merge pull request #1678 from martende/ticket/5753Eugene Burmako2012-11-2914-0/+54
|\ \ \ \ | |/ / / |/| | | SI-5753 macros cannot be loaded when inherited from a class or a trait
| * | | neg test addedmartende2012-11-276-0/+22
| | | |
| * | | 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-2518-29/+238
|\ \ \ \ | | | | | | | | | | Merge 2.10.0-wip into 2.10.x.
| * \ \ \ Merge remote-tracking branch 'origin/2.10.0-wip' into merge-2.10.wip-xPaul Phillips2012-11-2318-29/+238
| |\ \ \ \ | | |/ / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | # 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-199-27/+139
| | |\ \ \ | | | | | | | | | | | | SI-6640 Better reporting of deficient classpaths.
| | | * | | SI-6440 Address regressions around MissingRequirementErrorJason Zaugg2012-11-139-27/+139
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Go back to using globalError to report when a stub's info is referenced, and only throw the MissingRequirementError when compilation really must abort due to having a StubTermSymbol in a place where a StubClassSymbol would have been a better choice. This situation arises when an entire package is missing from the classpath, as was the case in the reported bug. Adds `StoreReporterDirectTest`, which buffers messages issued during compilation for more structured interrogation. Use this in two test for manifests -- these tests were using a crude means of grepping compiler console output to focus on the relevant output, but this approach was insufficient with the new multi-line error message emitted as part of this change. Also used that base test class to add two new tests: one for the reported error (package missing), and another for a simpler error (class missing). The latter test shows how stub symbols allow code to compile if it doesn't the subset of signatures in some type that refer to a missing class. Gave the INFO/WARNING/ERROR members of Reporter sensible toString implementations; they inherit from Enumeration#Value in an unusual manner (why?) that means the built in toString of Enumeration printed `Severity@0`.
| | * | | | Merge pull request #1638 from adriaanm/ticket-6624Josh Suereth2012-11-191-0/+28
| | |\ \ \ \ | | | | | | | | | | | | | | SI-6624 better lookup of case field accessors for case class pattern with complicated type
| | | * | | | SI-6624 set info of case pattern binder to help find case field accessorsAdriaan Moors2012-11-161-0/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | sometimes the type checker infers a weird type for a sub-pattern of a case class/extractor pattern this confuses the pattern matcher and it can't find the case field accessors for the sub-pattern use the expected argument type of the extractor corresponding to the case class that we're matching as the info for the sub-pattern binder -- this type more readily admits querying its caseFieldAccessors
| | * | | | | Merge pull request #1636 from paulp/issue/6628Adriaan Moors2012-11-162-0/+13
| | |\ \ \ \ \ | | | | | | | | | | | | | | | | Fixes SI-6628, Revert "Fix for view isEmpty."
| | | * | | | | Fixes SI-6628, Revert "Fix for view isEmpty."Paul Phillips2012-11-152-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit caf7eb6b56817fd1e1fbc1cf017f30e6f94c6bea. I don't have a better idea right now than wholesale reversion.
| | * | | | | | Merge pull request #1616 from retronym/backport/6559Adriaan Moors2012-11-163-2/+19
| | |\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | SI-6559 Fix raw string interpolator: string parts which were after the first argument were still escaped
| | | * | | | | | Fixes SI-6559 - StringContext not using passed in escape function.Josh Suereth2012-11-141-0/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As reported by Curtis Stanford, with indication of what to fix. standardInterpolator was not correctly calling the passed in process function, so raw strings were not really raw.
| | | * | | | | | Fix raw string interpolator: string parts which were after the first ↵Julien Richard-Foy2012-11-132-2/+2
| | | | |_|/ / / | | | |/| | | | | | | | | | | | | | | | | | | | argument were still escaped
| | * | | | | | Merge pull request #1615 from retronym/ticket/6648Adriaan Moors2012-11-161-0/+24
| | |\ \ \ \ \ \ | | | |_|/ / / / | | |/| | | | | SI-6648 copyAttrs must preserve TypeTree#wasEmpty
| | | * | | | | SI-6648 copyAttrs must preserve TypeTree#wasEmptyJason Zaugg2012-11-141-0/+24
| | | |/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This field tracks whether the type is an inferred on, subject to removal in `resetAttrs`, or an explicit type, which must remain. In ae5ff662, `ResetAttrs` was modified to duplicate trees, rather than mutate trees in place. But the tree copier didn't pass `wasEmpty` on to the new tree, which in turn meant that the subsequent typing run on the tree would not re-infer the types. If the type refers to a local class, e.g. the anonymous function in the enclosed test case, the reference to the old symbol would persist. This commit overrides `copyAttrs` in TypeTree to copy `wasEmpty`. We might consider representing this as a tree attachment, but this would need to be validated for the performance impact.
| | * | | | | Merge pull request #1608 from retronym/ticket/6644Josh Suereth2012-11-141-0/+8
| | |\ \ \ \ \ | | | |_|/ / / | | |/| | | | SI-6644 Account for varargs in extmethod forwarder
| | | * | | | SI-6644 Account for varargs in extmethod forwarderJason Zaugg2012-11-101-0/+8
| | | |/ / / | | | | | | | | | | | | | | | | | | | | | | | | Which sounded difficult, so instead I offshored the work to the friendly republic of TreeGen.
| | * | | | SI-6646 `ident` or Ident is always new binding.Jason Zaugg2012-11-132-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The previous commit regressed in these cases: // no withFilter for (X <- List("A single ident is always a pattern")) println(X) for (`x` <- List("A single ident is always a pattern")) println(`x`) At the top level of the LHS of a <-, such identifiers represent new bindings, not stable identifier patterns.
| | * | | | SI-6646 Fix regression in for desugaring.Jason Zaugg2012-11-102-0/+16
| | |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | The early check in the parser of pattern irrefutability, added in c82ecab, failed to consider InitCaps and `backquoted` identifiers.
* | | | | Merge pull request #1647 from adriaanm/backport-1626-2.10.xAdriaan Moors2012-11-252-0/+10
|\ \ \ \ \ | | | | | | | | | | | | Fix for SI-6357, cycle with value classes.
| * | | | | Fix for SI-6357, cycle with value classes.Paul Phillips2012-11-192-0/+10
| | |_|_|/ | |/| | | | | | | | | | | | | Don't force the owner info.
* | | | | 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.
* | | | | SI-6023 reify abstract valsYour Name2012-11-232-0/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Type trees created by MethodSynthesis for abstract val getters carry symless originals, which are unusable for reification purposes (or the result of reification will be unhygienic). To combat this, type trees for such getters are now created empty, i.e. without any `tpe` set, just having an original assigned. Subsequent `typedTypeTree` invocations fill in the `tpe` and update the original to be symful.
* | | | | Merge pull request #1645 from scalamacros/ticket/6673Josh Suereth2012-11-212-0/+6
|\ \ \ \ \ | | | | | | | | | | | | SI-6673 fixes macro problems with eta expansions
| * | | | | SI-6673 fixes macro problems with eta expansionsEugene Burmako2012-11-182-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Eta expansions previously caused the typer to disable macros. That was done in order to detect eta expansion of macro defs and show the user an appropriate error message. Macros were disabled because to find out whether we're expanding a macro def, we need to get its symbol, and to get a symbol of something we need to typecheck that something. However typechecking automatically expands macros, so, unless we disable macros, after a typecheck we won't be able to analyze macro occurrences anymore. Unfortunately this solution has a fatal flaw. By disabling macros we not only prevent the eta-expandee from macro expanding, but also all the subtrees of that eta-expandee (see SI-6673). This commit adds a mechanism for fine-grained control over macro expansion. Now it's possible to prohibit only the node, but not its children from macro expanding.
* | | | | | Merge pull request #1653 from retronym/ticket/6695Josh Suereth2012-11-211-0/+18
|\ \ \ \ \ \ | | | | | | | | | | | | | | SI-6695 Test case for fixed Array match bug
| * | | | | | SI-6695 Test case for fixed Array match bugJason Zaugg2012-11-211-0/+18
| | |_|/ / / | |/| | | |
* | | | | | Merge pull request #1596 from soc/SI-6632+SI-6633Josh Suereth2012-11-204-0/+68
|\ \ \ \ \ \ | | | | | | | | | | | | | | SI-6632 SI-6633 Fixes issues and data corruption in ListBuffer
| * | | | | | SI-6632 SI-6633 Fixes issues and data corruption in ListBufferSimon Ochsenreither2012-11-094-0/+68
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Disallow negative positions for ListBuffer#insert/insertAll/update - Fix data corruption issue in ListBuffer#insert
* | | | | | | Merge pull request #1597 from soc/SI-6634Josh Suereth2012-11-202-0/+111
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | SI-6634 Fixes data corruption issue in ListBuffer#remove
| * | | | | | | SI-6634 Fixes data corruption issue in ListBuffer#removeSimon Ochsenreither2012-11-162-0/+111
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is the cut-down version with minimally invasive changes, e. g. keeping the "auto-correcting" bounds algorithm.