summaryrefslogtreecommitdiff
path: root/test/files/run
Commit message (Collapse)AuthorAgeFilesLines
* Fix Iterator#copyToArray (fixes SI-6827).Erik Osheim2013-01-042-0/+46
| | | | | | | | | | | | | As pointed out in #scala, when using a non-zero start it's possible to get an ArrayIndexOutOfBoundsException due to an incorrect bounds check. This patch fixes this, as well as another potential bounds error, and adds test cases. Incorporates some other suggestions by Som-Snytt to ensure that callers will get useful error messages in cases where the start parameter is wrong (negative or out-of-array-bounds). Review by @som-snytt.
* Merge pull request #1822 from paulp/issue/6194Paul Phillips2013-01-032-0/+9
|\ | | | | SI-6194, repl crash.
| * SI-6194, repl crash.Paul Phillips2012-12-272-0/+9
| | | | | | | | | | | | Always a bad idea to use replaceAll on unknown strings, as we saw here when windows classpaths arrived containing escape-requiring backslashes.
* | LinearSeq lengthCompare without an iterator.Paul Phillips2012-12-282-10/+16
| | | | | | | | | | | | | | Had to fix up an iffy test: not only was it testing undefined behavior, it demanded just the right numbers be printed in a context where all negative or positive numbers are equivalent. It's the ol' "get them coming and going" trick.
* | SI-6415, overly eager evaluation in Stream.Jean-Remi Desjardins2012-12-282-0/+34
|/ | | | | | | The lengthCompare method in LinearSeqOptimized was looking one step further than it needed to in order to give the correct result, which was creating some unwanted side effects related to Streams.
* Merge pull request #1727 from scalamacros/ticket/6548Paul Phillips2012-12-192-0/+14
|\ | | | | SI-6548 reflection now correctly enters jinners
| * SI-6548 reflection now correctly enters jinnersEugene Burmako2012-12-072-0/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 #1754 from retronym/ticket/6288Adriaan Moors2012-12-145-10/+239
|\ \ | | | | | | SI-6288 Perfecting positions
| * | Expand pattern match position tests.Jason Zaugg2012-12-122-11/+82
| | | | | | | | | | | | | | | | | | - Adds tests for unapplySeq and unapply: Boolean. Both seem to be well positioned after the previous changes.
| * | SI-6288 Remedy ill-positioned extractor binding.Jason Zaugg2012-12-122-11/+12
| | | | | | | | | | | | | | | | | | The call to `Option#get` on the result of the unapply method was unpositioned and ended up with the position of the `match`.
| * | SI-6288 Fix positioning of label jumpsJason Zaugg2012-12-122-0/+102
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ICode generation was assigning the position of the last label jump to all jumps to that particular label def. This problem is particularly annoying under the new pattern matcher: a breakpoint in the body of the final case will be triggered on the way out of the body of any other case. Thanks to @dragos for the expert guidance as we wended our way through GenICode to the troublesome code. Chalk up another bug for mutability. I believe that the ICode output should be stable enough to use a a .check file, if it proves otherwise we should make it so.
| * | SI-6288 Position argument of unapplyJason Zaugg2012-12-112-0/+55
| | | | | | | | | | | | | | | | | | | | | `atPos(pos) { ... }` doesn't descend into children of already positioned trees, we need to manually set the position of `CODE.REF(binder)` to that of the stunt double `Ident(nme.SELECTOR_DUMMY)`.
* | | Merge pull request #1737 from retronym/ticket/6555Adriaan Moors2012-12-112-0/+37
|\ \ \ | | | | | | | | SI-6555 Better parameter name retention
| * | | SI-6555 Better parameter name retentionJason Zaugg2012-12-082-0/+37
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We were losing track of parameter names in two places: 1. Uncurry was using fresh names for the apply method parameters during Function expansion. (The parameter names in the tree were actually correct, they just had synthetic symbols with "x$1" etc.) 2. When adding specialized overrides, the parameter names of the overriden method were used, rather than the parameter names from the overriding method in the class to which we are adding methods. The upshot of this is that when you're stopped in the debugger in the body of, say, `(i: Int) => i * i`, you see `v1` rather than `i`. This commit changes Uncurry and SpecializeTypes to remedy this.
* | | 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 #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.