summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Fix InnerClass/EnclosingMethod for trait impl and specialized classesLukas Rytz2015-02-077-41/+214
| | | | | | | | | | Trait implementation classes and specialized classes are always considered top-level in terms of the InnerClass / EnclosingMethod attributes. These attributes describe source-level properties, and such classes are a compilation artifact. Note that the same is true for delambdafy:method closure classes (they are always top-level).
* SI-9124 fix EnclosingMethod of classes nested in implOnly trait defsLukas Rytz2015-02-073-1/+53
| | | | | | | | | | Private trait methods are not added to the generated interface, they end up only in the implementation class. For classes nested in such methods, the EnclosingMethod attribute was incorrect. Since the EnclosingMethod attribute expresses a source-level property, but the actual enclosing method does not exist in the bytecode, we set the enclosing method to null.
* SI-9105 Fix EnclosingMethod for classes defined in lambdasLukas Rytz2015-02-0712-43/+286
| | | | | | | | | | | | | | | | | | | | | This change fixes both GenASM and GenBCode, except for the change to renaming in LamdaLift mentioned below. The reason for an inconsistent EnclosingMethod attribute was the symbol owner chain. Initially, closure class symbols don't exist, they are only created in UnCurry (delambdafy:inline). So walking the originalOwner of a definition does not yield closure classes. The commit also fixes uses of isAnonymousClass, isAnonymousFunction and isDelambdafyFunction in two ways: 1. by phase-travelling to an early phase. after flatten, the name includes the name of outer classes, so the properties may become accidentally true (they check for a substring in the name) 2. by ensuring that the (destructive) renames during LambdaLift don't make the above properties accidentally true. This was in fact the cause for SI-8900.
* Merge pull request #4298 from adriaanm/contribAdriaan Moors2015-02-063-71/+187
|\ | | | | Rewrite contrib guidelines: shorter & friendlier
| * IDE setup sectionAdriaan Moors2015-02-063-23/+27
| |
| * Load balance across CONTRIBUTING/READMEAdriaan Moors2015-02-062-37/+139
| | | | | | | | Lower friction some more (submit PR first, ask questions later!)
| * Rewrite contrib guidelines: shorter & friendlierAdriaan Moors2015-02-051-42/+52
| | | | | | | | | | | | | | Refactored to be less "just do it this way", and more "here's how you can contribute more effectively". Tried to motivate requirements, strike lighter tone in general.
* | Merge pull request #4213 from soc/topic/scala-partest-1.0.3Adriaan Moors2015-02-051-1/+1
|\ \ | | | | | | Update scala-partest dependency to 1.0.3
| * | Update scala-partest dependency to 1.0.3Simon Ochsenreither2014-12-161-1/+1
| | |
* | | Merge pull request #4293 from BartoszJanota/patch-1Lukas Rytz2015-02-051-1/+2
|\ \ \ | | | | | | | | Patch 1 - Scala doc improved
| * | | Scala doc update (sliding method). Added info about default step set to 1. ↵BartekJanota2015-02-041-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Reading this doc (having no code) can be ambiguous. updated scala doc (overloaded sliding method) Step is a method parameter and must be always given explicit, so info about default value is wrong.
* | | | Merge pull request #4295 from retronym/ticket/9135Grzegorz Kossakowski2015-02-052-1/+17
|\ \ \ \ | | | | | | | | | | SI-9135 Fix NPE, a regression in the pattern matcher
| * | | | SI-9135 Fix NPE, a regression in the pattern matcherJason Zaugg2015-02-052-1/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The community build discovered that #4252 introduced the possibility for a NullPointerException. The tree with a null type was a synthetic `Apply(<<matchEnd>>)` created by the pattern matcher. This commit adds a null check.
* | | | | Merge pull request #4251 from retronym/ticket/6502Jason Zaugg2015-02-054-39/+64
|\ \ \ \ \ | | | | | | | | | | | | SI-6502 More robust REPL :require
| * \ \ \ \ Merge pull request #9 from som-snytt/review/6502Jason Zaugg2015-01-212-29/+25
| |\ \ \ \ \ | | | | | | | | | | | | | | SI-6502 Convert test to asserts
| | * | | | | SI-6502 Convert test to assertsSom Snytt2015-01-202-29/+25
| |/ / / / / | | | | | | | | | | | | | | | | | | This saves a check file in the crowded test directory.
| * | | | | REPL: Tread EOF a "no" in the "yes"/"no" prompt.Jason Zaugg2015-01-161-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Before, we got in an endless loop if using ^D to try to end the session. When piping commands into the REPL, this was rather annoying! ``` scala-hash v2.11.5 Welcome to Scala version 2.11.5-20150101-184742-3fafbc204f (Java HotSpot(TM) 64-Bit Server VM, Java 1.8.0_25). Type in expressions to have them evaluated. Type :help for more information. scala> :require xxx java.lang.NullPointerException at scala.tools.nsc.interpreter.ILoop.scala$tools$nsc$interpreter$ILoop$$flatten$1(ILoop.scala:651) at scala.tools.nsc.interpreter.ILoop.require(ILoop.scala:654) That entry seems to have slain the compiler. Shall I replay your session? I can re-run each line except the last one. [y/n]^D You must enter y or n. That entry seems to have slain the compiler. Shall I replay your session? I can re-run each line except the last one. [y/n]^D ... ```
| * | | | | SI-6502 More robust REPL :requireJason Zaugg2015-01-162-11/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - handle missing files gracefully (rather than NPE) - read the class name with ASM, rather than with a dummy classloader. The dummy classloader is prone to throwing `LinkageError`s, as reported in the comments of SI-6502. Manual test of the original report: ``` % qscala Welcome to Scala version 2.11.5-20150115-183424-155dbf3fdf (Java HotSpot(TM) 64-Bit Server VM, Java 1.8.0_25). Type in expressions to have them evaluated. Type :help for more information. scala> :require does/not/exist Cannot read: does/not/exist scala> classOf[org.junit.Test] <console>:8: error: object junit is not a member of package org classOf[org.junit.Test] ^ scala> :require /Users/jason/.m2/repository/junit/junit/4.11/junit-4.11.jar Added '/Users/jason/.m2/repository/junit/junit/4.11/junit-4.11.jar' to classpath. scala> classOf[org.junit.Test] res1: Class[org.junit.Test] = interface org.junit.Test ``` I have commited an automated test that is a minimization of this one.
* | | | | | Merge pull request #4248 from retronym/ticket/9086Jason Zaugg2015-02-052-1/+13
|\ \ \ \ \ \ | |_|/ / / / |/| | | | | SI-9086 Fix regression in implicit search
| * | | | | SI-9086 Fix regression in implicit searchJason Zaugg2015-01-292-1/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Implicit search declines to force the info of candidate implicits that either a) are defined beyond the position of the implicit search site, or b) enclose the implicit search site. The second criterion used to prevent consideration of `O` in the super constructor call: implicit object O extends C( { implicitly[X] }) However, after https://github.com/scala/scala/pull/4043, the block containing the implicit search is typechecked in a context owned by a local dummy symbol rather than by `O`. (The dummy and `O` share an owner.) This led to `O` being considered as a candidate for this implicit search. This search is undertaken during completion of the info of `O`, which leads to it being excluded on account of the LOCKED flag. Unfortunately, this also excludes it from use in implicit search sites subsequent to `O`, as `ImplicitInfo` caches `isCyclicOrErroneous`. This commit adjusts the position of the local dummy to be identical to that of the object. This serves to exclude `O` as a candidate during the super call on account of criterion a).
* | | | | | Merge pull request #4133 from som-snytt/issue/8976Ichoran2015-02-045-9/+127
|\ \ \ \ \ \ | |_|_|_|_|/ |/| | | | | SI-8976 MutableList.tail.iterator.size is length
| * | | | | SI-8976 MutableList.tail.iterator.size is lengthSom Snytt2014-12-065-9/+127
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The previous behavior was to iterate over the mutated list of arbitrary length. The previous iteration of the iterator would also iterate the terminal element of the list without halting. This is fixed by capping the length of iterator. That is OK because mutating the list by adding to it during iteration is not recommended. For good measure, the exhausted iterator does not hold a reference to any remaining tail. A test is added that will no doubt be superseded by the QCC tests. (Quasi-Comprehensive Collections.) The test just checks that the extra tail is not strongly reachable from the iterator. If the garbage collector happens to kick in and determine that the object is weakly reachable, then the check terminates early.
* | | | | | Merge pull request #4204 from mpociecha/correct-decimal-marks-in-testsGrzegorz Kossakowski2015-02-031-3/+12
|\ \ \ \ \ \ | | | | | | | | | | | | | | Fix problems with a locale-dependent decimal mark in StringContextTest
| * | | | | | Fix problems with a locale-dependent decimal mark in StringContextTestmpociecha2014-12-141-3/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit corrects three tests which were failing for certain locale due to the different decimal marks in the expected value and the result (e.g. 2.50 and 2,50). From now also the expected value is formatted in accordance with the current locale.
* | | | | | | Merge pull request #4233 from kanielc/SI-7770Lukas Rytz2015-02-034-2/+6
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | SI-7770 mutable.BitSet.toImmutable isn't immutable
| * | | | | | | SI-7770 mutable.BitSet.toImmutable isn't immutableDenton Cockburn2015-01-074-2/+6
| | |_|_|_|_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | Mark method as deprecated due to it not providing the expected result, while fixing it will break existing code.
* | | | | | | Merge pull request #4260 from retronym/ticket/9093Lukas Rytz2015-02-033-1/+12
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | SI-9093 Fix value discarding / multiple param list crasher
| * | | | | | | SI-9093 Fix value discarding / multiple param list crasherJason Zaugg2015-01-203-1/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The type error stemming from missing argument list was being swallowed when the expected type was `Unit` and there were undetermined type parameters in the expression. This commit modifies `adapt` to avoid using `instantiateExpectingUnit` when the tree is typed with `MethodType`.
* | | | | | | | Merge pull request #4252 from retronym/ticket/9050Lukas Rytz2015-02-032-1/+32
|\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | SI-9050 Fix crasher with value classes, recursion
| * | | | | | | | SI-9050 Fix crasher with value classes, recursionJason Zaugg2015-01-162-1/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | From the "Substitution is hard to do" department. In 7babdab9a, TreeSymSubstitutor was modified to mutate the info of symbols defined in the tree, if that symbol's info referred to one of the `from` symbols in the substitution. It would have been more principled to create a cloned symbol with the updated info, and add that to the substitution. But I wasn't able implement that correctly (let alone efficiently.) The in-place mutation of the info of a symbol led to the crasher in this bug: a singleton type over that symbol ends up with a stale cached value of 'underlying'. In the enclosed test case, this leads to a type error in the `SubstituteRecursion` of the extension methods phase. This commit performs a cleanup job at the end of `substituteSymbols` by invalidating the cache of any `SingleType`-s in the tree that refer to one of the mutated symbols.
* | | | | | | | | Merge pull request #4245 from dickwall/doc/scaladoc-concurrent-packageLukas Rytz2015-02-031-0/+74
|\ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | Document concurrent package object
| * | | | | | | | | Added package scaladoc for the concurrent package.dickwall2015-01-121-0/+74
| | |_|_|_|_|_|/ / | |/| | | | | | |
* | | | | | | | | Merge pull request #4292 from retronym/ticket/9133Grzegorz Kossakowski2015-02-033-1/+11
|\ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | SI-9133 Harden against infinite loop in NoSymbol.owner
| * | | | | | | | | Silence a feature warning in JUnit test code.Jason Zaugg2015-02-031-0/+1
| | | | | | | | | |
| * | | | | | | | | SI-9133 Harden against infinite loop in NoSymbol.ownerJason Zaugg2015-02-032-1/+10
| | |_|_|_|_|_|_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The available evidence gathered in an IDE hang suggests that while editing erronenous code, a call to `Erasure#javaSig` by the IDE's structure builder triggered the `ExplicitOuter` info transformer on a symbol with some sort of incoherent owner chain, which led to an infinite loop in `NoSymbol#outerClass`. This commit hardens that method to work in the same manner as a call to `NoSymbol.owner`: log the error under -Xdev or -Ydebug and return return `NoSymbol` to soldier on without crashing / hanging. I haven't formulated a theory about how we might have ended up with the corrupt owner chain.
* | | | | | | | | Merge pull request #4216 from som-snytt/issue/7623Lukas Rytz2015-02-035-6/+71
|\ \ \ \ \ \ \ \ \ | |/ / / / / / / / |/| | | | | | | | SI-7623 Trailing sequence wildcard warning
| * | | | | | | | SI-7623 Trailing sequence wildcard warningSom Snytt2015-01-215-6/+71
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | An -Xlint:stars-align warning for the case of patterns with at least one "fixed" component and a varargs component. Warn if the fixed patterns don't exactly align with the fixed value components, such that a sequence wildcard aligns exactly with the varargs component (either a T* parameter in a case class or a Seq[T] in an extractor result). This addresses the case of the xml.Elem extractor, which does not correspond to the Elem class constructor. One can be fooled into supplying an extra field for extraction. Vanilla extractors of type `Option[Seq[_]]` are unaffected by this flag. It's OK to ask for `case X(a, b, c)` in the expectation that three results are forthcoming. There is no semantic confusion over where the varargs begin.
* | | | | | | | | Merge pull request #4259 from mzitnik/2.11.xIchoran2015-01-302-1/+21
|\ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | SI-9072 Vector ++ concatenation of parallel collection cause inconsisten...
| * | | | | | | | | SI-9072 Vector ++ concatenation of parallel collection cause inconsistent ↵Mark Zitnik2015-01-182-1/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | results
* | | | | | | | | | Merge pull request #4276 from romanowski/2.11.xAdriaan Moors2015-01-302-8/+11
|\ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | Update scala version to 2.11.5 for Intellij 14
| * | | | | | | | | | Fix intellij 14 setup script to read scala version from version.propertiesKrzysztof Romanowski2015-01-302-8/+11
| | |_|_|_|_|_|_|_|/ | |/| | | | | | | |
* | | | | | | | | | Merge pull request #4257 from 193s/2.11.xAdriaan Moors2015-01-301-1/+1
|\ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | fix definition of TRY in the language specification
| * | | | | | | | | | fix definition of TRY in the language specIkumi Shimizu2015-01-171-1/+1
| | |/ / / / / / / / | |/| | | | | | | |
* | | | | | | | | | Merge pull request #4226 from jhegedus42/patch-1Adriaan Moors2015-01-301-2/+2
|\ \ \ \ \ \ \ \ \ \ | |_|/ / / / / / / / |/| | | | | | | | | Update 03-types.md
| * | | | | | | | | Update 03-types.mdjhegedus422014-12-301-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Using U_i instead of T_i is confusing. See http://stackoverflow.com/questions/26803244/is-this-a-typo-in-the-scala-language-specification-on-parameterized-types
* | | | | | | | | | Merge pull request #4271 from retronym/ticket/8642Adriaan Moors2015-01-283-3/+28
|\ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | SI-8642 Enable OSGi tests under Java 8
| * | | | | | | | | | SI-8642 Enable OSGi tests under Java 8Jason Zaugg2015-01-281-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We use the PAX Exam framework to integration test that the OSGi metadata we add to our JARs allows them to be loaded into the Felix and Equinox containers. However, we had to disable this test under Java 8 due to an incompatibility between that framework and the modern Java version. I have found a combination that works in Java 6, 7, and 8, so the test is now run under all Java versions. I have left a `skip` property to disable them, following the established convention. Tip of the hat to: - @soc / @rkrzewski for the work in #4066 that paved the way for this small change - Harald Wellman, for sharing [1] the Java 8 compatible combination of PAX and Felix . Testing: ``` for V in 1.6 1.7 1.8; do java_use $V; ant -q test.osgi; done java version "1.6.0_65" Java(TM) SE Runtime Environment (build 1.6.0_65-b14-466.1-11M4716) Java HotSpot(TM) 64-Bit Server VM (build 20.65-b04-466.1, mixed mode) ... [echo] Running OSGi JUnit tests. Output in /Users/jason/code/scala3/build/osgi [echo] Test pass 1 of 2 using Apache Felix 4.4.0 [echo] Test pass 2 of 2 using Eclipse Equinox 3.7.1 BUILD SUCCESSFUL Total time: 31 seconds java version "1.7.0_71" Java(TM) SE Runtime Environment (build 1.7.0_71-b14) Java HotSpot(TM) 64-Bit Server VM (build 24.71-b01, mixed mode) ... [echo] Running OSGi JUnit tests. Output in /Users/jason/code/scala3/build/osgi [echo] Test pass 1 of 2 using Apache Felix 4.4.0 [echo] Test pass 2 of 2 using Eclipse Equinox 3.7.1 BUILD SUCCESSFUL Total time: 22 seconds java version "1.8.0_25" Java(TM) SE Runtime Environment (build 1.8.0_25-b17) Java HotSpot(TM) 64-Bit Server VM (build 25.25-b02, mixed mode) ... [echo] Running OSGi JUnit tests. Output in /Users/jason/code/scala3/build/osgi [echo] Test pass 1 of 2 using Apache Felix 4.4.0 [echo] Test pass 2 of 2 using Eclipse Equinox 3.7.1 BUILD SUCCESSFUL Total time: 16 seconds ``` [1] https://groups.google.com/d/msg/ops4j/TN0sZFf6wLs/vUP0GML6-TQJ
| * | | | | | | | | | Add an IntelliJ module for the Pax Exam based OSGi testsJason Zaugg2015-01-283-2/+27
|/ / / / / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We can now edit these in IntelliJ, as per the regular JUnit tests.
* | | | | | | | | | Merge pull request #4268 from adriaanm/new-ci-validationAdriaan Moors2015-01-285-71/+249
|\ \ \ \ \ \ \ \ \ \ | |_|_|/ / / / / / / |/| | | | | | | | | IMPORTANT: Base your PR on this one --> New PR validation <--
| * | | | | | | | | IDE validation: run on last commitAdriaan Moors2015-01-271-0/+32
| | | | | | | | | |