summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Fix t8549 under -Ydelambdafy:methodLukas Rytz2014-10-103-2/+10
| | | | | | | | | | | | | | | | | | the structure of Option.class generated by delambdafy:method is slightly different. For example, lambdas declared within Option are not emitted as nested classes, so under delambdafy:method there's no inner class entry for anonfun classes. The test failed because serializing a ClassTag involves serializing an Option. Option did not have a `@SerialVersionUID`, and the classfile generated by delambdafy:method has a different value. The annotation is required on the parent class (Option) as well as the subclasses (Some / None). De-serializing a Some will fail if Option has a different SerialVersionUID. Relates to SI-8576. We should probably have more SVUID annotations in the library.
* Update check files for -Ydelambdafy:methodLukas Rytz2014-10-102-2/+6
| | | | Should have been done in 63207e1.
* Merge pull request #4018 from retronym/ticket/8774-concurrent-modificationLukas Rytz2014-09-301-2/+4
|\ | | | | Don't remove elements from a map during iteration.
| * Don't remove elements from a map during iteration.Jason Zaugg2014-09-301-2/+4
|/ | | | | | Doing so relies on implementation details which might change. See #3911 / SI-8774.
* Merge pull request #4011 from lrytz/t8445-6622Jason Zaugg2014-09-304-0/+72
|\ | | | | SI-8445, SI-6622 test cases, already fixed
| * SI-8445, SI-6622 test cases, already fixedLukas Rytz2014-09-294-0/+72
| | | | | | | | | | | | | | | | They were most likely fixed in #3931 / e3107465c3. The test case for SI-6622 is taken from Jason's PR #2654. I adjusted the EnclosingMethod to be `null` in two places in the check file, for the classes that are owned by fields (not methods).
* | Merge pull request #4013 from retronym/ticket/8868Lukas Rytz2014-09-307-2/+34
|\ \ | | | | | | SI-8868 Fix unpickling of local dummy symbols
| * | SI-8868 Fix unpickling of local dummy symbolsJason Zaugg2014-09-307-2/+34
|/ / | | | | | | | | | | | | | | | | | | | | | | These pop up as the owner of symbols in annotation arguments, such as the ones introduced by the names/defaults desugaring. The first two test cases here motivate the two patches to Unpicker. The third requires both fixes, but exploits the problem directly, without using `@deprecated` and named arguments. See also 14fa7be / SI-8708 for a recently remedied kindred bug.
* | Merge pull request #3996 from gourlaysama/wip/specJason Zaugg2014-09-2914-11/+690
|\ \ | | | | | | spec: generated TOC, with linkable headers and return to top links
| * | spec: a header that links to the index, with a scala logoAntoine Gourlay2014-09-236-5/+60
| | | | | | | | | | | | ...and a Scala favicon.
| * | spec: a print stylesheet to remove the TOC when printingAntoine Gourlay2014-09-232-0/+16
| | |
| * | spec: generated TOC with linkable headersAntoine Gourlay2014-09-229-7/+615
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds a table of contents to the spec, with a way to get the link of a header on hover (like on GitHub) and a "return to top" small icon at the end of each section. Jekyll generates the H1-level table of contents, and then the current one is expended using jQuery all the way down to H5 titles. Examples and H6 headers are ignored. GitHub's (MIT licensed) octicons are used for nice "link" and "up" icons.
* | | Merge pull request #4009 from gourlaysama/wip/test-flagsJason Zaugg2014-09-294-4/+0
|\ \ \ | | | | | | | | Cleanup a few compiler flags in test/files/
| * | | Cleanup a few flags in test/files/Antoine Gourlay2014-09-294-4/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * String interpolation isn't Xexperimental anymore A few useless Xexperimental flags in tests were left behind by 6917cca, after string interpolation was made non-experimental in 983f414. * things added under -Xfuture in 2.10 are very much Xpresent now, the flag isn't needed anymore.
* | | | Merge pull request #4007 from retronym/topic/bump-timeoutGrzegorz Kossakowski2014-09-291-1/+1
|\ \ \ \ | |_|_|/ |/| | | Bump timeout in interactive tests from 10s -> 30s.
| * | | Bump timeout in interactive tests from 10s -> 30s.Jason Zaugg2014-09-291-1/+1
|/ / / | | | | | | | | | | | | | | | | | | | | | Seeing too many of these failures on our build servers. https://scala-webapps.epfl.ch/jenkins/view/2.N.x/job/scala-nightly-auxjvm-2.11.x/148/jdk=jdk8,label=auxjvm/console This is most likely due to load on the machines.
* | | Merge pull request #4006 from retronym/topic/defragilityJason Zaugg2014-09-282-3/+2
|\ \ \ | |/ / |/| | Avoid test fragility to changes in Predef
| * | Avoid test fragility to changes in PredefJason Zaugg2014-09-282-3/+2
|/ / | | | | | | | | | | The check file used to contain a stack trace entry from Predef with a line number. I've made the macro fail in a different manner that avoids this fragility.
* | Merge pull request #4002 from retronym/merge/2.10.x-to-2.11.x-20140925Jason Zaugg2014-09-250-0/+0
|\ \ | | | | | | Merge 2.10.x to 2.11.x
| * | Merge remote-tracking branch 'origin/2.10.x' into ↵Jason Zaugg2014-09-250-0/+0
|/| | | | | | | | | | | merge/2.10.x-to-2.11.x-20140925
| * | Merge pull request #3998 from retronym/backport/7756Grzegorz Kossakowski2014-09-248-8/+69
| |\ \ | | | | | | | | [backport] SI-7756 Uncripple refchecks in case bodies
| | * | [backport] SI-7756 Uncripple refchecks in case bodiesJason Zaugg2014-09-238-8/+69
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In 65340ed4ad2e, parts of RefChecks were disabled when we traversed into the results of the new pattern matcher. Similar logic existed for the old pattern matcher, but in that case the Match / CaseDef nodes still existed in the tree. The new approach was too broad: important checks no longer scrutinized the body of cases. This commit turns the checks back on when it finds the remnants of a case body, which appears as an application to a label def. Conflicts: src/compiler/scala/tools/nsc/typechecker/RefChecks.scala Cherry pick of 3df1d77fc984b976efa68098206e801cf3b83a9e
* | | | Merge pull request #3999 from mpociecha/classpath-findSourceFile-method-renamingGrzegorz Kossakowski2014-09-244-5/+4
|\ \ \ \ | | | | | | | | | | Rename ClassPath.findSourceFile and delete Platform.doLoad
| * | | | Get rid of Platform.doLoad method.Grzegorz Kossakowski2014-09-241-1/+0
| | | | | | | | | | | | | | | | | | | | Since .NET backend got removed this method is a no-op.
| * | | | Rename ClassPath.findSourceFile to ClassPath.findClassFileGrzegorz Kossakowski2014-09-243-4/+4
|/ / / / | | | | | | | | | | | | | | | | | | | | | | | | If you look at the implementation of that method and its usage its clear that it should have been named `findClassFile` from the beginning because that's what it does: find a class file and not a source file.
* | | | Merge pull request #3994 from puffnfresh/feature/system-compiler-propertiesGrzegorz Kossakowski2014-09-242-4/+4
|\ \ \ \ | | | | | | | | | | Make compiler.properties fall back to prefixed
| * | | | Make compiler.properties fall back to prefixedBrian McKenna2014-09-222-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, if we wanted to override the shell.prompt property, we had to modify compiler.properties in the jar. This change lets us do the following, instead: scala -Dscala.shell.prompt="$(echo -e "\npuffnfresh> ")" All properties previously loaded from compiler.properties now fall back to "scala." in the system properties when not found.
* | | | | Merge pull request #3997 from krystiannowak/patch-1Jason Zaugg2014-09-231-1/+1
|\ \ \ \ \ | |_|_|_|/ |/| | | | HasSet to HashSet typo fix
| * | | | HasSet to HashSet typo fixKrystian Nowak2014-09-221-1/+1
|/ / / /
* | | | Merge pull request #3990 from som-snytt/issue/spec-overload-titleJason Zaugg2014-09-221-1/+1
|\ \ \ \ | |/ / / |/| | | Particular formatting improvement in the spec
| * | | Particular formatting improvement in the specSom Snytt2014-09-191-1/+1
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes the titularity of the "Overloading resolution" header under 6.26.1 "Value conversions" to match "Type instantiation." Hopefully this makes the link to the actual 6.26.3 overloading resolution section work without further renaming. (Edit: changed the minor heading to say "Static overload resolution", which is sufficiently redundant.) Possibly that is the oftenest-cited section of the entire document. At least on Stack Overflow, if not in Proceedings of the ACM.
* | | Merge pull request #3984 from gourlaysama/wip/specJason Zaugg2014-09-1920-773/+656
|\ \ \ | | | | | | | | General formatting improvements in the spec
| * | | spec: fix broken links and anchors, including examplesAntoine Gourlay2014-09-176-15/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | For examples, the "name" of the example (like "Example Ordered") is only used to derived its html id so that one can link to it (see `layouts/default.yml`). Ideally all examples should have a name; here I only added enough to satisfy existing links.
| * | | spec: remove trailing whitespace everywhereAntoine Gourlay2014-09-1716-660/+497
| | | |
| * | | spec: fix latex formatting all over the placeAntoine Gourlay2014-09-179-101/+104
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Two things worth mentioning: - `\em` and `emph` are not supported by MathJax, - and things like `\mathcal{C}_0` require escaping the `_`, otherwise markdown sees it as the beginning of `_some string_`. It doesn't happen without the closing bracket in front, e.g. in `b_0`.
| * | | spec: add syntax highlighting for scala code with highlight.jsAntoine Gourlay2014-09-173-0/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds syntax highlighting for all code scala blocks. Highlighting is done after MathJax is done rendering so that latex can be used in code blocks (and it currently *is* used). Sadly Scala isn't common enough to be bundled in the highlight.min.js available from CDNs, so we commit a local version of version 8.2 with only scala bundled in it. The only other language used (ebnf) isn't supported by highlight.js.
| * | | spec: use the yaml title as the HTML titleAntoine Gourlay2014-09-152-4/+4
| | | |
* | | | Merge pull request #3988 from ghik/issue/8459Jason Zaugg2014-09-184-1/+32
|\ \ \ \ | | | | | | | | | | SI-8459 fix incorrect positions for incomplete selection trees
| * | | | SI-8459 fix incorrect positions for incomplete selection treesghik2014-09-174-1/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The mentioned issue is a presentation compiler issue, but its root cause is a bug in the parser which incorrectly assigned positions to incomplete selection trees (i.e. selections that lack an indentifier after dot and have some whitespace instead). In detail: for such incomplete selection trees, the "point" of the position should be immediately after the dot but instead was at the start of next token after the dot. For range positions, this caused a pathological situation where the "point" was greater than the "end" of the position. This position is later used by the typechecker during resolution of dynamic calls and causes it to crash. Of course, because a syntactically incorrect code is required for the bug to manifest, it only happens in the presentation compiler.
* | | | | Merge pull request #3989 from retronym/ticket/8852Grzegorz Kossakowski2014-09-182-2/+37
|\ \ \ \ \ | | | | | | | | | | | | SI-8852 Support joint compilation of Java interfaces w. statics
| * | | | | SI-8852 Support joint compilation of Java interfaces w. staticsJason Zaugg2014-09-182-2/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We had to change the java parser to accomodate this language change in Java 8. The enclosed test does not require JDK8 to run, it only tests JavaParsers. Here is a transcript of my manual testing using Java 8. ``` % tail test/files/run/8852b/{Interface.java,client.scala} ==> test/files/run/8852b/Interface.java <== public interface Interface { public static int staticMethod() { return 42; } } ==> test/files/run/8852b/client.scala <== object Test extends App { assert(Interface.staticMethod() == 42) } // Under separate compilation, statics in interfaces were already working % rm /tmp/*.class 2> /dev/null; javac -d /tmp test/files/run/8852b/Interface.java && scalac-hash v2.11.2 -classpath /tmp -d /tmp test/files/run/8852b/client.scala && scala-hash v2.11.2 -classpath /tmp -nc Test // Under joint compilation, statics in interfaces now work. % rm /tmp/*.class 2> /dev/null; qscalac -d /tmp test/files/run/8852b/{client.scala,Interface.java} && javac -d /tmp test/files/run/8852b/Interface.java && qscala -classpath /tmp -nc Test ```
* | | | | | Merge pull request #3974 from xeno-by/topic/buffer-pattern-expander-errorsGrzegorz Kossakowski2014-09-187-12/+44
|\ \ \ \ \ \ | |_|/ / / / |/| | | | | This ensures that typechecking custom unapplications in silent mode
| * | | | | This ensures that typechecking custom unapplications in silent modeEugene Burmako2014-09-117-12/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | doesn't leak uncatchable errors. Interestingly enough, the problem only manifested itself for custom unapply methods, not for synthetic ones generated for case classes.
* | | | | | Merge pull request #3980 from retronym/ticket/8844Lukas Rytz2014-09-172-1/+5
|\ \ \ \ \ \ | |_|/ / / / |/| | | | | SI-8844 Fix regression with existentials + type aliases
| * | | | | SI-8844 Fix regression with existentials + type aliasesJason Zaugg2014-09-132-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Regressed in 2a1b15e / SI-8283. Another specimen of an archetypal bug: unwanted dealising by using `typeSymbol`, rather than `typeSymbolDirect`.
* | | | | | Merge pull request #3848 from Ichoran/issue/8680Lukas Rytz2014-09-164-14/+198
|\ \ \ \ \ \ | | | | | | | | | | | | | | SI-8680 Stream.addString is too eager
| * | | | | | SI-8680 Stream.addString is too eagerRex Kerr2014-09-124-14/+198
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Used the standard method of sending out two iterators, one twice as fast as the others, to avoid hanging on .force, .hasDefiniteSize, and .addString. .addString appends a "..." as the last element if it detects a cycle. It knows how to print the cycle length, but there's no good way to specify what you want right now, so it's not used. Added tests in t8680 that verify that cyclic streams give the expected results. Added to whitelist names of methods formerly used for recursion (now looping).
* | | | | | | Merge pull request #3941 from Ichoran/issue/8815Lukas Rytz2014-09-162-27/+26
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | SI-8815 mutable.LongMap makes different choices for splitAt vs etc.
| * | | | | | | SI-8815 mutable.LongMap makes different choices for splitAt vs etc.Rex Kerr2014-09-112-27/+26
| | |_|/ / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It turns out that take/drop/splitAt/takeWhile/dropWhile inherit a smattering of foreach vs. iterator-based implementations. These aren't consistent unless they iterate in the same order. This probably reflects an undesirable underlying weakness, but in this particular case it was easy to make LongMap's foreach order agree with iterator. Made traversal order of other foreach-like methods match also. Also fixed a bug where Long.MinValue wasn't iterated. Added unit test for iteration coverage of extreme values.
* | | | | | | Merge pull request #3936 from som-snytt/issue/8806Jason Zaugg2014-09-163-2/+20
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | SI-8806 Add lower bound check to Any lint