aboutsummaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* 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.
| * Fix #167Martin Odersky2014-10-112-3/+7
| | | | | | | | Can handle now vararg arguments in patterns.
| * Incorporating TypeTestsCasts into ErasureDmitry Petrashko2014-09-244-15/+24
| |
| * TypeTestsCasts now handles casts to constant types.Dmitry Petrashko2014-09-242-1/+3
| |
| * More accurate or postcondition conchecking in TreeCheckerMartin Odersky2014-09-242-2/+20
| | | | | | | | | | | | | | Previous postcondition checking did not take into account that phases are not flat - they consist in part of macro phases that contain miniphases. In fact the whole set up in Run is dubiuos - we should eliminate the problem at the root, as described in the TODO in run.
| * Patmat now succeeds tests.Dmitry Petrashko2014-09-234-13/+22
| | | | | | | | @odersky there are some tests disabled, which failed due to other phases being able to transform more code.
| * Made TypeVars uncahable keysMartin Odersky2014-09-231-1/+12
| | | | | | | | | | | | | | | | | | | | | | | | TypeVars can appear as keys in baseType caches. The problem is that their base types depend on their instantiation, which is not always know yet when the test is performed. So results of baseType on type variables should never be cached. Todo: check whether there are any other caching problems involving typevars. Conflicts: src/dotty/tools/dotc/core/SymDenotations.scala
| * Fix errorneus equality between TermRef and WithFixedSymDmitry Petrashko2014-09-231-1/+2
| |
| * @odersky have a look.Dmitry Petrashko2014-09-233-4/+5
| | | | | | | | testOnly dotc.tests
| * Fix problem in unapply typing.Martin Odersky2014-09-233-6/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | GADT bound resetting may only be applied when comparing <pattern type> <: <expected type>, not when comparing the other way around. The fix revealed an error in a test case (t1048) which looks like a real error. Therefore the test got moved to neg. Conflicts: src/dotty/tools/dotc/typer/Applications.scala test/dotc/tests.scala tests/disabled/t1048.scala
| * Renamed parameters in Typer&Applictaions.Dmitry Petrashko2014-09-232-12/+13
| | | | | | | | Indicating that pt is type of selector is this pattern match makes it easier to follow.
| * All pat-mat specific tests succeed now.Dmitry Petrashko2014-09-171-60/+121
| | | | | | | | | | Except t1048 which infers incorrect type in typer, patmat creates a tree that computes a more precise one that fails to typecheck Disabling erasure due to dozens of "Type BLA is illegal after erasure" errors.
| * Fixing periods for explicitOuterDmitry Petrashko2014-09-171-3/+5
| |