aboutsummaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* Completed constructors phaseMartin Odersky2014-10-112-71/+141
| | | | | | | 1) Type parameters are now copied to accessors 2) Constructors also work for traits 2) makes it possible do to mixin after constructors.
* Fix rewriting of by-name class parameter accessors.Martin Odersky2014-10-111-2/+6
| | | | Like the corresponding parameters, these also need to be rewritten to function types.
* Combine captured vars and constructors into one macro phase.Martin Odersky2014-10-112-3/+2
| | | | Needed to fix a problem in CapturedVars to make this work.
* Add constructors phaseMartin Odersky2014-10-113-19/+123
|
* Fix to primaryConstructorMartin Odersky2014-10-113-3/+12
| | | | | Primary constructor was picking last constructor instead of first one. This is now fixed. Also, added paramAccessors utility method.
* Account for PolyProto and IgnoredProto types in expectedTypeStrMartin Odersky2014-10-111-2/+4
|
* New utility methods in SymUtilsMartin Odersky2014-10-112-7/+26
|
* Fix tree typing to account for trees after constructors is run.Martin Odersky2014-10-114-19/+25
|
* Fix handling of type params in secondary constructorsMartin Odersky2014-10-111-4/+1
| | | | | | | | | Params are already added by Desugar. No special treatment needed here. Besides primaryConstructor.typeParams is always empty, because term symbols do not have type parameters. The fix turns t2660.scala into an error. I believe the error is correct, hence the test was moved with a comment to neg.
* Uncurry also in DefDef trees, not just in infos.Martin Odersky2014-10-111-1/+1
|
* Drop type declarations from erased ClassInfoMartin Odersky2014-10-112-2/+20
| | | | Need to drop all non-class type declarations.
* Erasure should keep prefix in termrefs.Martin Odersky2014-10-111-3/+3
| | | | The current formulation of lambda lift is easier to do if that's the case.
* Take environment into account when typing a closure.Martin Odersky2014-10-113-4/+10
| | | | Environment parameters do not count in th eresult type.
* Allow relaxed typing of applicationsMartin Odersky2014-10-112-2/+7
| | | | | | | | Some transformations encounter applications where new arguments ahve to be supplied. The method type already accounts for these argument but the Application node passed into TreeTransform#transformApply is constructed with a cpy.Apply operation which does a type assignment. That type assignment fails with a parameter mismatch unless relaxedTyping is on.
* Treat @static as a source flag.Martin Odersky2014-10-111-1/+1
| | | | It changes meaning drastically so should always be visible.
* Take receiver into account when selecting default getters.Martin Odersky2014-10-111-43/+53
| | | | | | Previously, we determined the default getters solely from the method TermRef type. This is wrong if the method is prefix is not a path -- the prefix of the term ref will be a TypeRef and the getter selection will be a SelectFromType tree, which makes no sense.
* Replace tree.withName with {tpd|untpd}.rename.treeMartin Odersky2014-10-115-18/+28
| | | | Advantage: Can rename typed as well as untyped trees.
* Fix lifting of application:Martin Odersky2014-10-111-1/+13
| | | | | Lifting an application `f(arg1).f(args)` requires lifting of the whole prefix `f(arg1)`, because `f` might have a side effect.
* Add isProperlyContainedIn methodMartin Odersky2014-10-112-2/+5
|
* Make enteredAfter, installAfter more forgiving as to when they are called.Martin Odersky2014-10-112-28/+26
| | | | | Instead of requiring to be called a given phase, change the context if that is not the case.
* Facturing out EnclosingMethodTraverser from CapturedVarsMartin Odersky2014-10-112-15/+26
| | | | | The idea to traverse with currently enclosing methid is also used in LambdaLift and could be used elsewhere.
* Replace call to unimplemented method runtimeCallMartin Odersky2014-10-112-4/+2
| | | | Use ref and appliedTo instead.
* Merge pull request #174 from dotty-staging/rebDmitry Petrashko2014-10-1187-1945/+7574
|\ | | | | Pattern matcher
| * Cleanup patmat based on feedbackDmitry Petrashko2014-10-111-72/+53
| | | | | | | | from pr #174.
| * make appliedToNone fail for exprType, use appliedIfMethod insteadDmitry Petrashko2014-10-113-8/+9
| | | | | | | | | | see discussion in https://github.com/dotty-staging/dotty/commit/0c551f00f43c1675aca3adbff7567f47432c66f6
| * prevPhase should indicate previous phase in explicitOuterDmitry Petrashko2014-10-111-4/+4
| | | | | | | | | | Makes it less confusing as thisTransformer is already used for the ExplicitOuter itself
| * Follow standard naming pattern in LazyValsDmitry Petrashko2014-10-112-14/+4
| |
| * Use more efficient type comparisonsDmitry Petrashko2014-10-112-16/+16
| | | | | | | | isRef is more efficient than subtyping check.
| * Make widening ops more systematic & completeMartin Odersky2014-10-111-7/+14
| | | | | | | | | | 1) strip TypeVars wehere necessary before widening 2) allow the combination of widening and dealiasing, in any order.
| * Cleanup patmat.Dmitry Petrashko2014-10-111-83/+12
| |
| * Seems to be a bug ping @odesrkyDmitry Petrashko2014-10-111-0/+1
| |
| * Fix SymDenotation.isPrimaryConstructorDmitry Petrashko2014-10-111-1/+1
| | | | | | | | .denot was missing
| * Document why patternMatcher needs to be after tailrec.Dmitry Petrashko2014-10-112-1/+4
| |
| * Allow extensions methods to play well with tailrec.Dmitry Petrashko2014-10-113-5/+13
| |
| * Join megaphases. Saves 80 out of 200 seconds for dotc.testsDmitry Petrashko2014-10-111-3/+3
| |
| * Make Extension methods a miniphaseDmitry Petrashko2014-10-111-44/+47
| |
| * Enable outer tests in pattern matcher.Dmitry Petrashko2014-10-112-8/+18
| | | | | | | | And a test for this.
| * Move check for casting a primitive to a non-primitive type from erasure to ↵Dmitry Petrashko2014-10-112-5/+18
| | | | | | | | refchecks
| * Make LazyVals an IdentityDenotTransformerDmitry Petrashko2014-10-111-6/+2
| |
| * Fixed needs outer testMartin Odersky2014-10-112-3/+4
| |
| * Fixed assertion to enfornce idempotency of substitutionsMartin Odersky2014-10-111-2/+2
| |
| * Enabling lazy vals.Dmitry Petrashko2014-10-111-1/+1
| | | | | | | | Unit tests still to-be-fixed
| * Fixing owner releated error in lazy vals.Dmitry Petrashko2014-10-111-1/+1
| | | | | | | | | | When lazy val body is moved to a init method the owner of symbols in tree should change
| * Setters are not case accessorsMartin Odersky2014-10-111-1/+1
| |
| * Porting lazy vals to a new scheme.Dmitry Petrashko2014-10-111-57/+33
| |
| * More better handling of typeTests in patmat.Dmitry Petrashko2014-10-111-10/+21
| | | | | | | | Now reuse symbols from typer. Less substitutions -> better performance.
| * Make SubstOnlyTreeMaker maintain type-safety.Dmitry Petrashko2014-10-111-3/+3
| | | | | | | | | | | | | | | | | | | | | | Implementation of pattern sel match { x => <body> } used to replace references to x by references to sel in <body>. This is not type correct and it also requires additional traversal of body. Now SubstOnlyTreeMaker generates a `x = sel` statement.
| * Make productArity a synthetic method which can be overriddenMartin Odersky2014-10-113-4/+5
| | | | | | | | | | | | Like other synthetic methods, productArity will not be generated if an explicit definition is given. Used to be generated unconditionally in desugaring.
| * Make rejection of deep subtype call stack optionalMartin Odersky2014-10-113-4/+2
| | | | | | | | | | | | Move flag that throws exception on deep subtyping stacks from Config varianble to setting. Disable setting for core-pickling which had a deep subtype failure after pattern matcher was integrated. Todo: Figure out why the subtype stack got so deep.
| * Make changeOwner more robust regarding non-standard owner chainsMartin Odersky2014-10-114-17/+41
| | | | | | | | | | | | | | | | | | | | | | The problem is running changeOwner(from, to) where - from is a ValDef or a Label - an embedded definition has as owner not `from` but some owner of `from`. We allow such denomrlaized owners and the pattern matcher generates them. This patch makes changeOwner take these situations into account.