summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Merge pull request #4179 from gdickinson/remove_commented_priorityqueue_codeAdriaan Moors2014-12-012-380/+0
|\ | | | | Remove commented priorityqueue code
| * Remove completely commented-out test/run fileGuy Dickinson2014-12-011-373/+0
| |
| * Remove commented-out debugging code in PriorityQueueGuy Dickinson2014-12-011-7/+0
| |
* | Merge pull request #4173 from kanielc/SI-7988Adriaan Moors2014-12-011-2/+2
|\ \ | | | | | | SI-7988 - scala.collection.JavaConverters spelling mistake
| * | SI:7988 - scala.collection.JavaConverters spelling mistakeDenton Cockburn2014-11-301-2/+2
| |/ | | | | | | Fixed typo and cleaned up the grammar in the paragraph
* | Merge pull request #4143 from Ichoran/issue/8695Adriaan Moors2014-12-011-1/+9
|\ \ | | | | | | SI-8695 SeqLike has unintuitive implementation of combinations
| * | SI-8695 SeqLike has unintuitive implementation of combinationsRex Kerr2014-11-231-1/+9
| | | | | | | | | | | | Clarified what `combinations` means in the docs.
* | | Merge pull request #4172 from advancedxy/spec-fixAdriaan Moors2014-12-012-2/+2
|\ \ \ | |_|/ |/| | add 0X... for hex number literal
| * | add 0X...hex number literal in syntax summaryYe Xianjin2014-11-301-1/+1
| | |
| * | add 0X... for hex number literalYe Xianjin2014-11-291-1/+1
| | |
* | | Merge pull request #4149 from Ichoran/issue/8754Grzegorz Kossakowski2014-11-283-17/+26
|\ \ \ | | | | | | | | SI-8754 linear seqs aren't
| * | | SI-8754 linear seqs aren'tRex Kerr2014-11-263-17/+26
| | |/ | |/| | | | | | | LinearSeqLike still isn't exactly linear (LinearSeqOptimized is), but at least the docs now give reasonably correct information about what is actually going on.
* | | Merge pull request #4112 from retronym/ticket/8502Grzegorz Kossakowski2014-11-286-13/+74
|\ \ \ | | | | | | | | SI-8502 Improve resiliance to absent packages
| * | | SI-8502 Improve resiliance to absent packagesJason Zaugg2014-11-286-13/+74
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When unpickling a class, we create stub symbols for references to classes absent from the current classpath. If these references only appear in method signatures that aren't called, we can proceed with compilation. This is in line with javac. We're getting better at this, but there are still some gaps. This bug is about the behaviour when a package is completely missing, rather than just a single class within that package. To make this work we have to add two special cases to the unpickler: - When unpickling a `ThisType`, convert a `StubTermSymbol` into a `StubTypeSymbol`. We hit this when unpickling `ThisType(missingPackage)`. - When unpickling a reference to `<owner>.name` where `<owner>` is a stub symbol, don't call info on that owner, but rather allow the enclosing code in `readSymbol` fall through to create a stub for the member. The test case was distilled from an a problem that a Spray user encountered when Akka was missing from the classpath. Two existing test cases have progressed, and the checkfiles are accordingly updated.
* | | Merge pull request #4170 from retronym/ticket/disable-8946Jason Zaugg2014-11-281-0/+0
|\ \ \ | | | | | | | | SI-8946 Disable flaky test for reflection memory leak
| * | | SI-8946 Disable flaky test for reflection memory leakJason Zaugg2014-11-281-0/+0
|/ / / | | | | | | | | | | | | | | | It passed in PR validation but failed in a later run. There are some clever ideas bouncing around to make it stable, but in the meantime I'll shunt it into disabled.
* | | Merge pull request #3934 from teemulehtinen/fsc-port-argGrzegorz Kossakowski2014-11-265-27/+54
|\ \ \ | | | | | | | | FSC server port selected by argument
| * | | Add option -port to fscTeemu Lehtinen2014-10-135-27/+54
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Option "port" limits compile server lookup and start to given port. Normally fsc will start a compile server in a random port if no server is yet running. This can be problematic with firewalls and/or remote compile servers. Option "port" should not be confused with option "server" which looks for a compile server in given host and port and fails if such server is not found. Automatic tests for command line user interface do not exist at all. Thus, adding a test for one new option would require designing a whole new testing method.
* | | | Merge pull request #4130 from mpociecha/let-specify-build-repos-homeGrzegorz Kossakowski2014-11-262-2/+5
|\ \ \ \ | |_|_|/ |/| | | Let users specify a different location for build repos than user home
| * | | Let users specify a different location for build repos than user homempociecha2014-11-122-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change is helpful e.g. when setting up CI for Scala and it's important which directories are used by a build. By default it uses .m2, .pax and .sbt/cache from user home (in general $HOME). Sometimes it's not possible to use this location and also changing a value of $HOME is not an option. The required location should be specified both for ant's build.xml and used scripts. In the first case specifying -Duser.home is all, what we need. But we can't just set _JAVA_OPTIONS as then partest tests fail due to the unexpected output (an additional 'Picked up java options (...)' messages). We can set ANT_OPTS instead of this. The only problem was that OSGi JUnit tests (only they) were using $HOME anyway. I forced them to use -Duser.home by propagating this option in build.xml. binary-repo-lib.sh is changed to use a special env variable or $HOME, when this variable is not set. Then we can do: export SCALA_BUILD_REPOS_HOME=<some_dir> export ANT_OPTS="$ANT_OPTS -Duser.home=$SCALA_BUILD_REPOS_HOME" ant dist and it will create all directories .m2, .pax and .sbt/cache in a specified $SCALA_BUILD_REPOS_HOME directory. Note: maven's settings.xml should be located in this used $SCALA_BUILD_REPOS_HOME/.m2 and point to the repository like <some_dir>/.m2/repository
* | | | Merge pull request #4148 from SpinGo/issue/SI-8946Jason Zaugg2014-11-263-2/+40
|\ \ \ \ | | | | | | | | | | SI-8946: Fixes memory leak when using reflection
| * | | | Fixes memory leak when using reflectionTim Harper2014-11-223-2/+40
| | |_|/ | |/| | | | | | | | | | | | | | | | | | References to Threads would be retained long after their termination if reflection is used in them. This led to a steady, long memory leak in applications using reflection in thread pools.
* | | | Merge pull request #4151 from som-snytt/issue/5205Adriaan Moors2014-11-241-3/+1
|\ \ \ \ | |/ / / |/| | | SI-5205 Finish applying octal deletion
| * | | SI-5205 Finish applying octal deletionSom Snytt2014-11-231-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | The original PR was partially applied to markdown. https://github.com/scala/scala-dist/pull/103
* | | | Merge pull request #4084 from vigdorchik/usecase_sigsGrzegorz Kossakowski2014-11-2117-12/+33
|\ \ \ \ | | | | | | | | | | Correct collections variable definitions to avoid many scaladoc warnings.
| * | | | Correct collections variable definitions to avoid many scaladoc warnings.Eugene Vigdorchik2014-11-0617-12/+33
| | | | |
* | | | | Merge pull request #4121 from retronym/ticket/5938Grzegorz Kossakowski2014-11-211-0/+35
|\ \ \ \ \ | | | | | | | | | | | | SI-5938 Test for a FSC bug with mixin, duplicate static forwarders
| * | | | | SI-5938 Test for a FSC bug with mixin, duplicate static forwardersJason Zaugg2014-11-091-0/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Under resident compilation, we were getting multiple copies of static forwarders created for mixed in methods. It seems like the bug was fixed as a by-product of #4040. This commit adds a test to show this. I've confirmed that the test fails appropriately with 2.11.4. For future reference, before I figured out how to write the test for this one (test/resident doesn't seem to let you run the code after compiling it), I was using bash to test as follows: (export V=2.11.x; (scalac-hash $V sandbox/t5938_1.scala; (for i in 1 2; do echo sandbox/t5938.scala; done; printf '\n') | scalac-hash $V -Xresident); stty echo; scala-hash $V X ; echo ':javap -public X' | scala-hash $V);
* | | | | | Merge pull request #4099 from retronym/ticket/7596Grzegorz Kossakowski2014-11-217-1/+66
|\ \ \ \ \ \ | | | | | | | | | | | | | | SI-7596 Curtail overloaded symbols during unpickling
| * | | | | | SI-7596 Curtail overloaded symbols during unpicklingJason Zaugg2014-11-067-1/+66
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In code like: object O { val x = A; def x(a: Any) = ... } object P extends O.x.A The unpickler was using an overloaded symbol for `x` in the parent type of `P`. This led to compilation failures under separate compilation. The code that leads to this is in `Unpicklers`: def fromName(name: Name) = name.toTermName match { case nme.ROOT => loadingMirror.RootClass case nme.ROOTPKG => loadingMirror.RootPackage case _ => adjust(owner.info.decl(name)) } This commit filters the overloaded symbol based its stability unpickling a singleton type. That seemed a slightly safer place than in `fromName`.
* | | | | | | Merge pull request #4138 from stevegury/patch-1Grzegorz Kossakowski2014-11-211-1/+1
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | Fix one typo in the scaladoc of Inliners
| * | | | | | | Fix one typo in the scaladoc of InlinersSteve Gury2014-11-201-1/+1
| | |_|_|/ / / | |/| | | | | | | | | | | | | | | | | | | The Scaladoc of `Inliners` contained one tiny typo for the word "accessibility". This PR only fixes this typo.
* | | | | | | Merge pull request #4115 from retronym/ticket/8597Grzegorz Kossakowski2014-11-219-6/+137
|\ \ \ \ \ \ \ | |/ / / / / / |/| | | | | | SI-8597 Improved pattern unchecked warnings
| * | | | | | SI-8597 Expand documentation of CheckabilityCheckerJason Zaugg2014-11-181-1/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Cherry picking some of the previous commit message.
| * | | | | | SI-8597 Improved pattern unchecked warningsJason Zaugg2014-11-099-5/+115
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The spec says that `case _: List[Int]` should be always issue an unchecked warning: > Types which are not of one of the forms described above are > also accepted as type patterns. However, such type patterns > will be translated to their erasure (§3.7). The Scala compiler > will issue an “unchecked” warning for these patterns to flag > the possible loss of type-safety. But the implementation goes a little further to omit warnings based on the static type of the scrutinee. As a trivial example: def foo(s: Seq[Int]) = s match { case _: List[Int] => } need not issue this warning. These discriminating unchecked warnings are domain of `CheckabilityChecker`. Let's deconstruct the reported bug: def nowarn[T] = (null: Any) match { case _: Some[T] => } We used to determine that if the first case matched, the scrutinee type would be `Some[Any]` (`Some` is covariant). If this statically matches `Some[T]` in a pattern context, we don't need to issue an unchecked warning. But, our blanket use of `existentialAbstraction` in `matchesPattern` loosened the pattern type to `Some[Any]`, and the scrutinee type was deemed compatible. I've added a new method, `scrutConformsToPatternType` which replaces pattern type variables by wildcards, but leaves other abstract types intact in the pattern type. We have to use this inside `CheckabilityChecker` only. If we were to make `matchesPattern` stricter in the same way, tests like `pos/t2486.scala` would fail. I have introduced a new symbol test to (try to) identify pattern type variables introduced by `typedBind`. Its not pretty, and it might be cleaner to reserve a new flag for these. I've also included a test variation exercising with nested matches. The pattern type of the inner case can't, syntactically, refer to the pattern type variable of the enclosing case. If it could, we would have to be more selective in our wildcarding in `ptMatchesPatternType` by restricting ourselves to type variables associated with the closest enclosing `CaseDef`. As some further validation of the correctness of this patch, four stray warnings have been teased out of neg/unchecked-abstract.scala I also had to changes `typeArgsInTopLevelType` to extract the type arguments of `Array[T]` if `T` is an abstract type. This avoids the "Checkability checker says 'Uncheckable', but uncheckable type cannot be found" warning and consequent overly lenient analysis. Without this change, the warning was suppressed for: def warnArray[T] = (null: Any) match { case _: Array[T] => }
* | | | | | | Merge pull request #4123 from retronym/ticket/8253Jason Zaugg2014-11-204-1/+58
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | SI-8253 Fix incorrect parsing of <elem xmlns={f("a")}/>
| * | | | | | | SI-8253 Fix incorrect parsing of <elem xmlns={f("a")}/>Jason Zaugg2014-11-104-1/+58
| |/ / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The spliced application was placed in the `attrMap` in `SymbolicXMLBuilder` and later incorrectly matched by a pattern intended only to match: xml.Text(s) That attribute value is generated by parsing: <elem xmlns='a'/> So the net effect was that the two fragments of XML were identical! This commit sharpens up the match to really look for a syntactic `_root_.scala.xml.Text("...")`. The test just prints the parse trees of a variety of cases, as we we should not test the modularized XML library in scala/scala.
* | | | | | | Merge pull request #4132 from phaller/ticket/7444Jason Zaugg2014-11-191-8/+10
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | SI-7444 docs: null Executor allowed in ExecutionContext factories
| * | | | | | | SI-7444 docs: null Executor allowed in ExecutionContext factoriesPhilipp Haller2014-11-141-8/+10
| | |_|_|_|/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | Update the ScalaDoc for the factory methods for `ExecutionContext` which allow a `null` `Executor`/`ExecutorService`.
* | | | | | | Merge pull request #4118 from retronym/ticket/5639Jason Zaugg2014-11-1913-15/+185
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | SI-5639 Fix spurious discarding of implicit import
| * | | | | | | SI-5639 Predicate bug fix on -Xsource:2.12Jason Zaugg2014-11-185-1/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | To be conservative, I've predicated this fix in `-Xsource:2.12`. This is done in separate commit to show that the previous fix passes the test suite, rather than just tests with `-Xsource:2.12`.
| * | | | | | | SI-5639 Fix spurious discarding of implicit importJason Zaugg2014-11-099-15/+152
| | |/ / / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In Scala fa0cdc7b (just before 2.9.0), a regression in implicit search, SI-2866, was discovered by Lift and fixed. The nature of the regression was that an in-scope, non-implicit symbol failed to shadow an eponymous implicit import. The fix for this introduced `isQualifyingImplicit` which discards in-scope implicits when the current `Context`'s scope contains a name-clashing entry. Incidentally, this proved to be a shallow solution, and we later improved shadowing detection in SI-4270 / 9129cfe9. That picked up cases where a locally defined symbol in an intervening scope shadowed an implicit. This commit includes the test case from the comments of SI-2866. Part of it is tested as a neg test (to test reporting of ambiguities), and the rest is tested in a run test (to test which implicits are picked.) However, in the test case of SI-5639, we see that the scope lookup performend by `isQualifyingImplicit` is fooled by a "ghost" module symbol. The apparition I'm referring to is entered when `initializeFromClassPath` / `enterClassAndModule` encounters a class file named 'Baz.class', and speculatively enters _both_ a class and module symbol. AFAIK, this is done to defer parsing the class file to determine what inside. If it happens to be a Java compiled class, the module symbol is needed to house the static members. This commit adds a condition that `Symbol#exists` which shines a torch (forces the info) in the direction of the ghost module symbol. In our test, this causes it to vanish, as we only need a class symbol for the Scala defined `class Baz`. The existing `pos` test for this actually did not exercise the bug, separate compilation is required. It was originally checked in to `pending` with this error, and then later moved to `pos` when someone noticed it was not failing.
* | | | | | | Merge pull request #4051 from heathermiller/repl-cp-fix2Jason Zaugg2014-11-188-18/+354
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | SI-6502 Reenables loading jars into the running REPL (regression in 2.10)
| * | | | | | | SI-6502 Refactorings suggested by reviewHeather Miller2014-11-103-33/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Moves mergeUrlsIntoClassPath from Global into ClassPath - Revises and documents AbstractFile.getURL
| * | | | | | | SI-6502 Moving methods concerned with the state of Global from IMain to GlobalHeather Miller2014-11-052-33/+36
| | | | | | | |
| * | | | | | | Addresses review commentsHeather Miller2014-11-052-28/+9
| | | | | | | |
| * | | | | | | Adds tests that programatically generate jarsHeather Miller2014-11-052-0/+109
| | | | | | | |
| * | | | | | | SI-6502 Addresses comments by @som-snyttHeather Miller2014-11-051-9/+3
| | | | | | | |
| * | | | | | | SI-6502 Addresses @som-snytt's feedbackHeather Miller2014-11-051-4/+3
| | | | | | | |
| * | | | | | | SI-6502 Addressing review commentsHeather Miller2014-11-052-23/+26
| | | | | | | |