summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* SI-4560 - improved testJohannes Rudolph2012-07-243-30/+52
| | | | | | Added all the known cases of failing self-types. Added tests for symbol access (SI-4601) as well which should now be fixed for all of the same cases as well.
* Revert "tentative fix for RC5 lift build problem."Johannes Rudolph2012-07-242-6/+3
| | | | | | | | | This reverts commit cb4fd65825f3c88908103e48d0d7e89d70d26c22. Conflicts: src/compiler/scala/tools/nsc/symtab/Types.scala src/compiler/scala/tools/nsc/typechecker/Contexts.scala
* Revert "Closes #4560. Review by dragos." (introduction of safeREF)Johannes Rudolph2012-07-241-32/+15
| | | | | | | | This reverts commit 124cf3f9cbdc582a432c13edd229ba9b8726b99f. Conflicts: src/compiler/scala/tools/nsc/transform/CleanUp.scala
* Revert fix part of "Closes 4560. Review by dragos."Johannes Rudolph2012-07-241-6/+6
| | | | | | | | This reverts commit 7127d8293775905acd0d04e21d9e045b5c029261. Conflicts: test/files/run/t4560.scala
* Fix SI-4560, NoSuchMethodErrors involving self types.Paul Phillips2012-07-243-5/+45
| | | | | | | | | | | | | | | Following this commit are reversions of three prior commits which introduced difficulties of their own, plus extra tests for this issue and SI-4601, all of which I pinched from jrudolph. Maybe there was a good reason for some of the complicated code related to this ticket. I took the naive position that if we avoided generating a method call to a particular receiver if the receiver has no such method, we would encounter fewer NoSuchMethodErrors. I would believe one can construct a scenario which this doesn't handle correctly, but it's hard to believe this isn't a big improvement. Review by @jrudolph, @odersky.
* Merge pull request #984 from scalamacros/ticket/6058Adriaan Moors2012-07-241-11/+25
|\ | | | | SI-6058 makes JavaMirror caches weak
| * SI-6058 makes JavaMirror caches weakEugene Burmako2012-07-241-11/+25
| | | | | | | | | | | | As discussed on reflection meeting on 2012/07/19, runtime reflection caches need to be weak. This way we prevent leaks in long-running reflection-based applications (the primary target here being SBT).
* | Merge pull request #966 from paulp/issue/6117Adriaan Moors2012-07-245-15/+52
|\ \ | |/ |/| SI-6117 regression involving import ambiguity.
| * Fix SI-6117, regression involving import ambiguity.Paul Phillips2012-07-212-3/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Today I learned that foo.member("bar") != foo.member("bar") if bar is overloaded, because each lookup of an overloaded member creates a new symbol (with equivalent OverloadedTypes.) How should symbols be compared so these do not appear unequal? Is there a method which unpacks the alternatives and compares them individually? It seems likely there are additional bugs which arise from not covering this case. Since this bug is in the context of importing, if the prefixes are identical then I can compare the names instead of the symbols and this issue goes away. But for the rest of the time during which one might encounter overloaded symbols, that would be a very lossy operation, since the overloaded symbol might be encoding any subset of the members with that name. There are lots of references to "OverloadedSymbol" in the comments of various methods in Types, but no such class is visible in the history. If we had such a thing, we could refine its equals method to recognize equivalent overloads. Review by @odersky.
| * Tweak to symbol tracer.Paul Phillips2012-07-211-12/+17
| | | | | | | | | | | | Stop recording symbols once the shutdown hook is triggered so that the symbols created in the act of dumping the symbols do not pollute the view of what symbols were created naturally.
| * Renaming files to please ant.Paul Phillips2012-07-212-0/+0
| | | | | | | | "If the names don't fit, do not commit!"
* | Merge pull request #978 from adriaanm/haraldme-patch-1Adriaan Moors2012-07-241-1/+1
|\ \ | | | | | | [doc] Fix example of `Ordering.on` usage.
| * | [doc] Fix example of `Ordering.on` usage.haraldme2012-07-231-1/+1
| | |
* | | Merge pull request #971 from dragos/ide/safe-reflection-baseAdriaan Moors2012-07-244-16/+22
|\ \ \ | | | | | | | | SI-6122: Small changes to reflection API to make it safe for IDE use.
| * | | Small changes to reflection API to make it safe for IDE use.Iulian Dragos2012-07-234-16/+22
| | | | | | | | | | | | | | | | | | | | * Removed `typeSymbol` and `termSymbol` from `reflect.api.base`, and pushed them down to `reflect.api`. * extracted `TypeTree.symbol` to a top-level method so it can be overridden in other layers
* | | | Merge pull request #974 from adriaanm/repull-unchecked-hkAdriaan Moors2012-07-245-6/+36
|\ \ \ \ | | | | | | | | | | Improve unchecked warnings.
| * | | | Improve unchecked warnings.Paul Phillips2012-07-235-6/+36
| | | | | | | | | | | | | | | | | | | | | | | | | Spurious test was not good. Better test avoids suppressing some legitimate warnings. Review by @moors.
* | | | | Merge pull request #979 from adriaanm/ticket-6111Adriaan Moors2012-07-2411-70/+128
|\ \ \ \ \ | | | | | | | | | | | | SI-6111 accept single-subpattern unapply pattern
| * | | | | docs related to fix for SI-6111Adriaan Moors2012-07-242-3/+9
| | | | | |
| * | | | | SI-6111 accept single-subpattern unapply patternAdriaan Moors2012-07-2311-70/+122
| | |_|/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | An extractor pattern `X(p)` should type check for any `X.unapply`/`X.unapplySeq` that returns an `Option[_]` -- previously we were confused about the case where it was an `Option[(T1, ... , Tn)]`. In this case, the expected type for the pattern `p` is simply `(T1, ... , Tn)`. While I was at it, tried to clean up unapplyTypeList and friends (by replacing them by extractorFormalTypes). From the spec: 8.1.8 ExtractorPatterns An extractor pattern x(p1, ..., pn) where n ≥ 0 is of the same syntactic form as a constructor pattern. However, instead of a case class, the stable identifier x denotes an object which has a member method named unapply or unapplySeq that matches the pattern. An unapply method in an object x matches the pattern x(p1, ..., pn) if it takes exactly one argument and one of the following applies: n = 0 and unapply’s result type is Boolean. n = 1 and unapply’s result type is Option[T], for some type T. the (only) argument pattern p1 is typed in turn with expected type T n > 1 and unapply’s result type is Option[(T1, ..., Tn)], for some types T1, ..., Tn. the argument patterns p1, ..., pn are typed in turn with expected types T1, ..., Tn
* | | | | Merge pull request #975 from adriaanm/ticket-4881bAdriaan Moors2012-07-233-6/+45
|\ \ \ \ \ | |/ / / / |/| | | | SI-4881 infer variance from formals, then result
| * | | | SI-4881 infer variance from formals, then resultMartin Odersky2012-07-233-6/+45
|/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | Changed behavior so that when determining the target variance of a method parameter, the variance in formals comes first. If variance is still undecided by that, the variance in the result type is used as a secondary criterion. (This is also done when determining prototype type params.)
* | | | Merge pull request #964 from odersky/ticket/6090Adriaan Moors2012-07-232-1/+7
|\ \ \ \ | |/ / / |/| | | SI-6090 correct rewriting of overloaded value class ==
| * | | SI-6090Martin Odersky2012-07-212-1/+7
| |/ / | | | | | | | | | Sharpens the test so that only Object_== and Object_!= methods on valueclasses may be rewritten in posterasure, whereas user-defined methods are not rewritten.
* | | Merge pull request #965 from dragos/fix-package-prefixAdriaan Moors2012-07-221-2/+10
|\ \ \ | | | | | | | | Handle multiple packages in one source file in the presentation compiler.
| * | | Handle multiple packages in one source file in the presentation compiler.Iulian Dragos2012-07-211-2/+10
| |/ / | | | | | | | | | | | | | | | | | | The PC symbol loader would mistakenly refuse to enter symbols if more than one package declaration occurred in the same file. This has become common practice: package object foo { … } package foo { … }
* | | Merge pull request #972 from adriaanm/ticket-6089Adriaan Moors2012-07-221-0/+18
|\ \ \ | |_|/ |/| | SI-6089 test file for pt2
| * | SI-6089 test file for pt2Adriaan Moors2012-07-221-0/+18
|/ / | | | | | | test that matchEnd that's an argument of || that's in tail position is in tail position
* | Merge pull request #958 from adriaanm/ticket-1832Josh Suereth2012-07-213-57/+75
|\ \ | | | | | | SI-1832 consistent symbols in casedef's pattern&body
| * | SI-1832 consistent symbols in casedef's pattern&bodyAdriaan Moors2012-07-202-32/+51
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | the only change to typedBind in this commit (beyond refactoring to keep my eyes from bleeding), is explained by the added comment: have to imperatively set the symbol for this bind to keep it in sync with the symbols used in the body of a case when type checking a case we imperatively update the symbols in the body of the case those symbols are bound by the symbols in the Binds in the pattern of the case, so, if we set the symbols in the case body, but not in the patterns, then re-type check the casedef (for a second try in typedApply for example -- SI-1832), we are no longer in sync: the body has symbols set that do not appear in the patterns since body1 is not necessarily equal to body, we must return a copied tree, but we must still mutate the original bind
| * | update docs for (partial) fun synth in uncurryAdriaan Moors2012-07-201-25/+24
| | |
* | | Merge pull request #963 from adriaanm/ticket-6089Josh Suereth2012-07-211-0/+3
|\ \ \ | | | | | | | | SI-6089 pt2: _ is tailpos in `_ || _` and `_ && _`
| * | | SI-6089 pt2: _ is tailpos in `_ || _` and `_ && _`Adriaan Moors2012-07-211-0/+3
| | | | | | | | | | | | | | | | | | | | pull #939 made tail position detection for matches more strict to fix SI-6089, but became too strict: need to include the tail positions `_` in `_ || _` and `_ && _`.
* | | | Merge pull request #961 from VladUreche/issue/scaladocLukas Rytz2012-07-212-5/+0
|\ \ \ \ | |_|_|/ |/| | | Scaladoc: Removing forgotten debugging info
| * | | Scaladoc: Removing forgotten debugging infoVlad Ureche2012-07-212-5/+0
| | | | | | | | | | | | | | | | (blush)
* | | | Merge pull request #962 from dragos/docs/readme-link-to-pr-policyAdriaan Moors2012-07-211-2/+2
|\ \ \ \ | | | | | | | | | | Add link to the PR policy in the README
| * | | | Linked the PR policy in the README file.Iulian Dragos2012-07-211-2/+2
|/ / / /
* | | | Merge pull request #957 from adriaanm/annoying-throwableAdriaan Moors2012-07-2116-26/+24
|\ \ \ \ | |_|/ / |/| | | address "this would catch all throwables" warnings
| * | | address "this would catch all throwables" warningsMartin Odersky2012-07-2016-26/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | original patch by @odersky in #955 -- criterion for the refactor: "catch Throwable as long as there's no obvious control flow exception going through the catch and the caught exception is processed further" rebased & updated with review comments in #955 and #954
* | | | Merge pull request #954 from odersky/optimize/outerAdriaan Moors2012-07-202-2/+31
|\ \ \ \ | | | | | | | | | | Removes redundant outers
| * | | | Removes redundant outersMartin Odersky2012-07-202-2/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Widens the criterion when outer fields can be omitted. It used to be that sub- and superclass had to be enclosed by the same outer class. Only in that case was the outer field of the class omitted. We now omit if subclass is contained in an outer class that is itself a subclass of the superclasses outer class. See test case "outertest.scala" for an example.
* | | | | Merge pull request #924 from hubertp/2.10.x-issue/5385Adriaan Moors2012-07-208-14/+55
|\ \ \ \ \ | | | | | | | | | | | | Fix for SI-5385.
| * | | | | Fix for SI-5385.Paul Phillips2012-07-178-14/+55
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Nodes which hit EOF with no whitespace afterward had wrong position.
* | | | | | Merge pull request #948 from gkossakowski/target-1.6Lukas Rytz2012-07-206-19/+23
|\ \ \ \ \ \ | | | | | | | | | | | | | | Deprecate all JVM 1.5 targets and make 1.6 default.
| * | | | | | Switch to 1.6 target for all javac invocations.Grzegorz Kossakowski2012-07-191-13/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Switch to 1.6 target for all javac invocations we perform in build.xml. This way we do not emit java 1.5 byte-code either from scalac or javac. This commit should complete the move off java 1.5 byte-code.
| * | | | | | Deprecate all JVM 1.5 targets and make 1.6 default.Grzegorz Kossakowski2012-07-193-4/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a check if deprecated target is being used. I put that check into `checkDeprecatedSettings`. I tried to invent some general mechanism for deprecating choices in ChoiceSetting but I gave up eventually. It wasn't worth it the complexity. Also, with current approach I'm able to provide nice, customized deprecation warning. Make `jvm-1.6` a default backend. Altered test for SI-5957 because it crashes the backend. However, the problem is not with backend but with symbol creation. We get two different symbols with the same internal name and both are used in trees that reach GenASM. See SI-6109 for details. Review by @magarciaEPFL and @paulp.
| * | | | | | Better debugging output in GenASM.Grzegorz Kossakowski2012-07-191-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When assertion fails, let's provide the context.
| * | | | | | Updated list of targets allowed in Ant's scalac.Grzegorz Kossakowski2012-07-191-1/+1
| | |/ / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | It looks like scala.tools.ant.Scalac class had a stale list of allowed targets. Made it in sync with what compiler supports.
* | | | | | Merge pull request #894 from axel22/topic/static-annot-cherry-2.10.xLukas Rytz2012-07-2012-37/+551
|\ \ \ \ \ \ | | | | | | | | | | | | | | Implement @static annotation on singleton object fields.
| * | | | | | Use `findMember` to lookup the static field in the host class.Aleksandar Prokopec2012-07-201-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The upcoming `findMember` optimizations should ensure that this is fast enough.