aboutsummaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* Fix unset tree positionAlexSikia2015-05-111-1/+1
| | | | Debugs some cases where `tree.pos` wasn't initialised properly.
* Re-enable testsMartin Odersky2015-05-111-2/+0
| | | | | Most tests were still commented out in last merge. Also, an outdated comment in TreeTypeMap was removed.
* Companion methods are not real methodsGuillaume Martres2015-05-092-3/+5
|
* rename isSourceMethod to isRealMethod, the previous name was inaccurateGuillaume Martres2015-05-096-9/+13
|
* Merge pull request #550 from dotty-staging/lazy-vals-fixesodersky2015-05-094-23/+37
|\ | | | | Various fixes to LazyVals.
| * Add a postcondition to constructors.Dmitry Petrashko2015-05-081-0/+11
| |
| * Workaround #548.Dmitry Petrashko2015-05-081-1/+4
| |
| * LazyVals: inject Offset definitions in Template.Dmitry Petrashko2015-05-081-13/+13
| | | | | | | | Otherwise Constructors is not able to see them and they get lost.
| * LazyVals: fix initialisers of local lazy vals to be called.Dmitry Petrashko2015-05-081-4/+4
| |
| * Fix printing of Constant(Claz), ie getClass[Claz]Dmitry Petrashko2015-05-081-5/+5
| | | | | | | | Previous scheme did not work after erasure.
* | Merge pull request #551 from dotty-staging/fix/#547-overloaded-varargsDmitry Petrashko2015-05-091-2/+6
|\ \ | | | | | | Fix #547: Vararg overload
| * | Fix #547: Vararg overloadMartin Odersky2015-05-081-2/+6
| | | | | | | | | | | | | | | When comparing to types in isAsSpecific, onvert repeated parameters to their underlying type only if both types are vararg methods. This mimics scalac behavior.
* | | Merge pull request #543 from dotty-staging/compile-dottyodersky2015-05-0910-43/+99
|\ \ \ | |_|/ |/| | Make dotty compile backend.
| * | Reload denotations that are not defined at current phaseMartin Odersky2015-05-083-10/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Up to now a NotDefinedHere exception was thrown if a denotation was not defined at the current phase, but was defined elsewhere in the current run. However, if the denotation is a SingleDenotation or MultiDenotation it is possible that the particular Single- or Multi-Denotation was not computed at the current phase, but the underlying SymDenotation is valid. With the changes in this commit, we reaload the denotation as a second try.
| * | PatternMatcher: fix bug with undefined variable inside huge patterns.Dmitry Petrashko2015-05-081-3/+3
| | |
| * | Remove NonExistentTree.Dmitry Petrashko2015-05-081-3/+2
| | |
| * | Workaround dotty deviation in for loop patterns.Dmitry Petrashko2015-05-081-5/+10
| | |
| * | Address some of dotty deviations in backend.Dmitry Petrashko2015-05-082-2/+2
| | | | | | | | | | | | Implicit vals need explicit type, anonymous classes are widened.
| * | Do not use deprecated procedure syntax in GenBCode.Dmitry Petrashko2015-05-082-16/+21
| | |
| * | Remove debug printlnMartin Odersky2015-05-081-1/+0
| | |
| * | Drop the requirement that extractors with `get` must implement ProductMartin Odersky2015-05-081-3/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | We used to require that the result type of an extractor `get` is a product, or else the type of the `get` itself would be taken as the result type of the unapply. This is now relaxed so that we automatically select with _1, _2, ... as soon as there are multiple argument patterns, and (1) the result type is not a Seq, (2) the number of consecutive product conselectors matches the number of arguments.
| * | Make isTerm/isType not force the denotation of a symbols defined in this run.Dmitry Petrashko2015-05-081-2/+6
| | | | | | | | | | | | See discussion in #544
| * | Rename localClasses -> definedClassesMartin Odersky2015-05-071-3/+3
| | |
| * | Make isTerm/isType not force the denotation of a symbol to be up-to-date.Martin Odersky2015-05-071-2/+2
| | | | | | | | | | | | | | | | | | Symbols never change betwene terms and types. So we do not need to the current denotation to decide what they are. Less forcing -> less potential for cyclic references.
| * | Fix #536 - only load member classes of classes that are currently compiled.Martin Odersky2015-05-072-2/+20
| | | | | | | | | | | | | | | | | | | | | It seems wasteful to load the member classes even of classes that are not currently compiled. It also makes us vulnerable to any misinterpretation of Java file formats. In th particular case of #536, we parsed a class an anonymous Collection$1 which was referring to the type parameter of its enclosing class, but was not diagnosed as an inner class of the enclosing class.
* | | Merge pull request #542 from dotty-staging/fix/#540-unbounded-generic-arrayDmitry Petrashko2015-05-081-4/+5
|\ \ \ | |_|/ |/| | Fix #540 - unbounded array test for wildcard array arguments
| * | Fixed foc of isUnboudnedGenericArrayMartin Odersky2015-05-081-3/+3
| | |
| * | Remove debug printlnMartin Odersky2015-05-061-1/+0
| | |
| * | Fix #540 - unbounded array test for wildcard array argumentsMartin Odersky2015-05-061-1/+3
| | | | | | | | | | | | | | | | | | Arrays with wildcard arguments such as Array[_ <: Foo] where Foo is a universal trait are now diagnosed as unbounded generic arrays and are erased to Object.
* | | Merge pull request #541 from dotty-staging/fix/#537-extractorsDmitry Petrashko2015-05-061-3/+6
|\ \ \ | |_|/ |/| | Drop the requirement that extractors with `get` must implement Product
| * | Remove debug printlnMartin Odersky2015-05-051-1/+0
| | |
| * | Drop the requirement that extractors with `get` must implement ProductMartin Odersky2015-05-051-3/+7
| |/ | | | | | | | | | | | | | | | | We used to require that the result type of an extractor `get` is a product, or else the type of the `get` itself would be taken as the result type of the unapply. This is now relaxed so that we automatically select with _1, _2, ... as soon as there are multiple argument patterns, and (1) the result type is not a Seq, (2) the number of consecutive product conselectors matches the number of arguments.
* / Allow to compile root import classes without special option.Martin Odersky2015-05-053-10/+12
|/ | | | | Can now compile Predef/DottyPredef without -Yno-import option. Achieved by making some parts of imports more lazy.
* Merge pull request #534 from dotty-staging/fix/computeDenotodersky2015-05-053-24/+34
|\ | | | | Fix #518 - compute denotations
| * Rename isWeakRef -> isTightPrefixMartin Odersky2015-05-051-7/+9
| | | | | | | | | | isWeakRef was confusing because this has nothing to do with weak pointers.
| * Make data race detection more liberal.Martin Odersky2015-05-042-4/+1
| | | | | | | | | | | | | | | | | | | | Allow to rebind a NmedType to refer to a symbol in a subclass of where the previous symbol was defined. This generalizes the previous rule that we allow to rebind from a root method to its synthetic implementation. The change is not necessary to make the new scheme of computeDenot pass the tests, but it seems useful to avoid spurious errors elsehere.
| * Fix infinite recursion when creating extension methodsMartin Odersky2015-05-041-2/+1
| | | | | | | | | | | | | | | | | | | | Phase ExtensionMethods creates new symbols for extension methods and then installs these symbols into the companion object of a value class. It's important that the creation of these symbols is done in the phase ExtensionMethods itself, and not in the next phase, as was done before. If we do it in the next phase, we need the owner at the next phase and with the new scheme of computeDenot that owner might be forced, leading to an infinite cycle.
| * Make computeDenot take overrides into accountMartin Odersky2015-05-041-18/+30
| | | | | | | | | | | | | | | | | | If previous denotation was a sym denotation, it might be overridden by a different symbol in a new phase or run. So it is not correct to simply return the current version of the symbol, as was done before. We now recompute the member if there is a chance that the symbol could be overridden.
* | Merge pull request #509 from dotty-staging/add/expandSAMsDmitry Petrashko2015-05-0412-27/+176
|\ \ | | | | | | Expand SAM closures to anonymous classes if needed
| * | More conditions under which SAMs are converted to anonymous classesMartin Odersky2015-05-022-6/+16
| | | | | | | | | | | | | | | | | | | | | Also included are - Closures implementing classes that inherit from a class other than Object - Closures that implement traits which run initialization code.
| * | Refactoring and renaming of superClass/superInterfacesMartin Odersky2015-05-022-19/+9
| | | | | | | | | | | | | | | | | | | | | | | | superClass was a duplicate; we already have one in SymDenotation, so we delete the one in SymUtils. superInterfaces is too easy to confused with the JVM notion, which is different. I replaced with directlyInheritedTraits.
| * | Fix noInitMember to apply to DefDefsMartin Odersky2015-05-021-1/+1
| | | | | | | | | | | | Thanks for pointing it out, @smarter.
| * | Generalize tpd.AnonClassMartin Odersky2015-05-022-12/+11
| | | | | | | | | | | | | | | | | | | | | Now takes a list of parent types. We needed only one parent for SAM implementation but it makes sense to generalize this. Also, removed redundant code accidentally left in.
| * | Remove worksround in ExpandSAMsMartin Odersky2015-05-021-14/+1
| | | | | | | | | | | | Removed the workaround of the original crasher which was addressed in the last commit.
| * | Make sure types of pattern bound variables are fully-defined.Martin Odersky2015-05-021-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | Like all other variables, pattern-bound vars need a fully defined type. I was thinking originally that demanding a fully defined selector type is sufficient to ensure this, but that's not true: An outer pattern might call a polymorphic unapply and its type variables need not be fully instantiated. With the fix, the minimized test case from ExpandSAMs works.
| * | New miniphase: ExpandSAMsMartin Odersky2015-05-024-0/+103
| | | | | | | | | | | | The phase replaces SAM closures with anonymous classes when necessary.
| * | Avoid prepare actions form earlier phases when doing a transformFollowinfDeepMartin Odersky2015-05-021-1/+8
| | | | | | | | | | | | See comment in the code.
| * | New utility method tpd.AnonymousClassMartin Odersky2015-05-021-1/+28
| | | | | | | | | | | | As the name implies, this creates an anonymous class.
| * | Make tpd.ClassDef work for polymorphic parent classes.Martin Odersky2015-05-021-2/+3
| | | | | | | | | | | | | | | | | | | | | The handling of the first parent of ClassDef was broken if that parent had type parameters. This was exposed by following commites which use ClassDef more intensively than before in creating anonymous classes representing closures.
| * | New symbol creation method: `newNormalizedClassSymbol`.Martin Odersky2015-05-021-0/+24
| | | | | | | | | | | | | | | | | | It's common that one wants to create class symbols with arbitary parent types, not just TypeRefs. But for the casual user it's non-obvious how to do it. Hence the new creation method.