summaryrefslogtreecommitdiff
path: root/test/files
Commit message (Collapse)AuthorAgeFilesLines
* Merge pull request #1834 from paulp/issue/6897Paul Phillips2013-01-061-0/+6
|\ | | | | SI-6897, lubs and varargs star.
| * SI-6897, lubs and varargs star.Paul Phillips2012-12-311-0/+6
| | | | | | | | | | Don't allow lubs to calculate refinement types which contain a varargs star outside of legal varargs star position.
* | Merge pull request #1835 from paulp/issue/6896Paul Phillips2013-01-062-0/+8
|\ \ | | | | | | SI-6896, spurious warning with overloaded main.
| * | SI-6896, spurious warning with overloaded main.Paul Phillips2012-12-312-0/+8
| |/ | | | | | | | | Make sure there's no legit main signature before issuing any warnings about missing main methods.
* | Merge pull request #1840 from paulp/issue/6911Paul Phillips2013-01-063-69/+106
|\ \ | | | | | | SI-6911, regression in generated case class equality.
| * | SI-6911, regression in generated case class equality.Paul Phillips2013-01-033-69/+106
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Caught out by the different semantics of isInstanceOf and pattern matching. trait K { case class CC(name: String) } object Foo extends K object Bar extends K Foo.CC("a") == Bar.CC("a") That expression is supposed to be false, and with this commit it is once again.
* | | Merge pull request #1841 from adriaanm/rebase-6827-2.10.xAdriaan Moors2013-01-042-0/+46
|\ \ \ | | | | | | | | Fix Iterator#copyToArray (fixes SI-6827).
| * | | 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 #1739 from jedesah/Array_optPaul Phillips2013-01-042-0/+15
|\ \ \ | |/ / |/| | SI-5017 Poor performance of :+ operator on Arrays
| * | SI-5017 Poor performance of :+ operator on ArraysJean-Remi Desjardins2012-12-232-0/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Control performance of :+ and +: operator on my machine were 700-800 ms After adding size hint on the implementation in SeqLike, it went down to 500-600 ms But with specialixed implementation in ArrayOps, brings it down to 300-400 ms Unfortunatly, this method will only be called when the Array object is being referenced directly as it's type, but that should be the case enough times to justify the extra method. I ended up removing the sizeHint in SeqLike because it made the execution of the "benchmark" slower when the Array was being manipulated as a Seq. Side note: Interestingly enough, the benchmark performed better on my virtualized Fedora 17 with JDK 7 than natively on Mac OS X with JDK 6
* | | 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.
* | | Merge pull request #1824 from paulp/pr/partest-likes-deprecationPaul Phillips2012-12-317-3/+7
|\ \ \ | | | | | | | | Remove -deprecation from partest default options.
| * | | Remove -deprecation from partest default options.Paul Phillips2012-12-277-3/+7
| |/ / | | | | | | | | | | | | | | | | | | Who knows why it was ever like this; it's not like anyone sees the deprecation warnings. In PR #1807 there is now a test which depends on partest not making this move, so it's a good time to finally expunge it.
* | | 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.
* | SI-6829, SI-6788, NPEs during erroneous compilation.Paul Phillips2012-12-244-0/+112
| | | | | | | | | | | | Have to intercept trees which have a null type due to errors before they leave the warm confines of 'def typed' because from that point everything assumes tree.tpe != null.
* | Merge pull request #1790 from paulp/2.10.0-wip-mergeAdriaan Moors2012-12-202-0/+6
|\ \ | | | | | | Merge 2.10.0-wip into 2.10.x
| * \ Merge remote-tracking branch 'origin/2.10.0-wip' into 2.10.0-wip-mergePaul Phillips2012-12-192-0/+6
| |\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | # By Eugene Burmako (1) and others # Via Adriaan Moors (2) and others * origin/2.10.0-wip: Fixing OSGi distribution. Fix for rangepos crasher. SI-6685 fixes error handling in typedApply
| | * | Fix for rangepos crasher.Paul Phillips2012-12-042-0/+6
| | | | | | | | | | | | | | | | | | | | wrapClassTagUnapply was generating an unpositioned tree which would crash under -Yrangepos. See SI-6338.
* | | | Merge pull request #1788 from retronym/ticket/6848Paul Phillips2012-12-202-0/+4
|\ \ \ \ | |/ / / |/| | | Implicit vars should have non-implicit setters.
| * | | Implicit vars should have non-implicit setters.Jason Zaugg2012-12-192-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Otherwise they trigger spurious feature warnings. scala> trait T { implicit var a: Any } <console>:7: warning: implicit conversion method a_= should be enabled by making the implicit value language.implicitConversions visible.
* | | | Merge pull request #1778 from JamesIry/p_SI-6795_2.10.xAdriaan Moors2012-12-192-0/+7
|\ \ \ \ | | | | | | | | | | SI-6795 simplify "abstract override" errors on type members
| * | | | SI-6795 Simplify errors related to "abstract override" on type membersJames Iry2012-12-102-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Instead of saying "only allowed on non-type members of traits" use separate errors for "not allowed on types" and "only allowed on members of traits"
| * | | | SI-6795 Adds negative check for "abstract override" on types in traitsJames Iry2012-12-102-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | "abstract override" shouldn't was being allowed on types in traits but the result made no sense and the spec says that shouldn't be allowed.
* | | | | Merge pull request #1709 from retronym/ticket/3995Adriaan Moors2012-12-192-0/+38
|\ \ \ \ \ | | | | | | | | | | | | SI-3995 Exclude companions with an existential prefix.
| * | | | | Expand test with a stably qualified example.Jason Zaugg2012-12-052-1/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In the example below, we need a view from `String => l.F0`, and the companion object `FO` is reachable by a stable, non existentially-bound path. class Lift { def apply(f: F0) {} class F0 object F0 { implicit def f2f0(fn: String): F0 = ??? } } object Test { val l = new Lift l.apply("") // okay } Followup for SI-3995
| * | | | | SI-3995 Exclude companions with an existential prefix.Jason Zaugg2012-12-052-0/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In `(qual: Q).apply(expr)` where `expr` must be implictily converted to a path dependent type `T` defined in `qual`, we were looking for companion implicits via a path prefixed by an existential skolem `_1`. These aren't much good to us, as when we try to feed them into `mkAttributedQualifer`, a crash rightly ensues. This commit excludes companions prefixed by an existentially bound path.
* | | | | | Merge pull request #1727 from scalamacros/ticket/6548Paul Phillips2012-12-193-1/+15
|\ \ \ \ \ \ | | | | | | | | | | | | | | SI-6548 reflection now correctly enters jinners
| * | | | | | 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 #1759 from scalamacros/topic/annotatedPaul Phillips2012-12-194-0/+59
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | fixes incorrect handling of Annotated in lazy copier
| * | | | | | | fixes incorrect handling of Annotated in lazy copierEugene Burmako2012-12-134-0/+59
| | | | | | | |
* | | | | | | | Merge pull request #1707 from retronym/ticket/5390Adriaan Moors2012-12-179-0/+67
|\ \ \ \ \ \ \ \ | |_|_|_|_|/ / / |/| | | | | | | SI-5390 Detect forward reference of case class apply
| * | | | | | | Test showing the absence of a forward referenceJason Zaugg2012-12-161-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These are only forbidden in terms, they are permitted in types.
| * | | | | | | SI-5390 Detect forward reference of case class applyJason Zaugg2012-12-048-0/+56
| | |_|/ / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Refchecks performs (among others) two tasks at once: - detecting forward references - translating `qual.Case(...)` to `new qual.Case(...)` As is often the case with such multi-tasking tree traversals, completion of one task precluded the other.
* | | | | | | Merge pull request #1706 from retronym/ticket/5361Adriaan Moors2012-12-153-2/+9
|\ \ \ \ \ \ \ | |_|_|_|_|_|/ |/| | | | | | SI-5361 Avoid cyclic type with malformed refinement
| * | | | | | SI-5361 Avoid cyclic type with malformed refinementJason Zaugg2012-12-043-2/+9
| |/ / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The statement `val x = this` in the refinment type: (new {}): {val x = this} is lazily typechecked, in order to, according to the comment in `typedRefinment, "avoid cyclic reference errors". But the approximate type used ends up with: Refinment@1( parents = [...] decls = { val x: Refinement@1 }) This commit eagerly checks that there is no term definitions in type refinments, rather than delaying this. This changes the error message for SI-3614.
* | | | | | Merge pull request #1766 from scalamacros/topic/typed-ident-attachmentsEugene Burmako2012-12-144-0/+22
|\ \ \ \ \ \ | | | | | | | | | | | | | | typedIdent no longer destroys attachments
| * | | | | | typedIdent no longer destroys attachmentsEugene Burmako2012-12-134-0/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When transforming Idents to qualified Selects, typedIdent used to forget about carrying original attachments to the resulting tree. Not anymore.
* | | | | | | 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 #1742 from scalamacros/ticket/4044Paul Phillips2012-12-121-6/+1
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | prevents spurious kind bound errors
| * | | | | | | prevents spurious kind bound errorsEugene Burmako2012-12-101-6/+1
| |/ / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | The patch adds a check which makes sure that the trees we're about to report aren't already erroneous.
* | | | | | | Merge pull request #1758 from hubertp/2.10.x-issue/strip-tvarsAdriaan Moors2012-12-121-0/+25
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | When we strip tvars we should also recursively strip their instantiation...
| * | | | | | | Recurse into instantiations when stripping type vars.Hubert Plociniczak2012-12-121-0/+25
| | |_|_|_|/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This led to the inference of weird types as list of lub base types was empty. This change fixes case x3 in the test case.
* | | | | | | Merge pull request #1747 from hubertp/2.10.x-issue/6758Adriaan Moors2012-12-125-22/+84
|\ \ \ \ \ \ \ | |_|_|/ / / / |/| | | | | | Fixes SI-6758: force LazyAnnnotationInfo for DefDef and TypeDef
| * | | | | | Fixes SI-6758: force LazyAnnnotationInfo for DefDef and TypeDefHubert Plociniczak2012-12-115-22/+84
| |/ / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Looks like the change in 25ecde037f22ff no longer forced lazy annotations for some of the cases. Also removed forcing for PackageDef annotations as we currently don't support them.