aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Merge pull request #142 from DarkDimius/fix-transforms-periododersky2014-07-175-10/+40
|\ | | | | Fix using of wrong period for creating nested ctx in TreeTransforms
| * Phases in tests now also have valid periods.Dmitry Petrashko2014-07-164-0/+23
| |
| * Fix wrong period for creating nested ctx in TreeTransforms.Dmitry Petrashko2014-07-161-2/+5
| | | | | | | | | | | | | | `owner` for nestedContext in `TreeTransforms` was assigned using initial period of whole `TreeTransforms` block. That is incorrect as denotation for this owner could have been create by some phase in this block.
| * Short-circuit TreeTransform.transformDmitry Petrashko2014-07-161-5/+7
| | | | | | | | No need to perform zero transformations.
| * Short-circuit transformSingleDmitry Petrashko2014-07-161-5/+7
| | | | | | | | There is no need to recurse in tree if there are no transformations left.
* | Merge pull request #135 from dotty-staging/docs/higher-kinded-v2odersky2014-07-141-0/+375
|\ \ | |/ |/| Docs/higher kinded v2
| * Sync with implementationMartin Odersky2014-07-141-51/+100
| | | | | | | | Adapted docs so that they reflect what has been implemented.
| * fixed typosMartin Odersky2014-05-301-5/+5
| |
| * Fixed typosMartin Odersky2014-05-301-7/+7
| |
| * Version 2, picking up on an idea of Adriaan.Martin Odersky2014-05-301-0/+326
| |
* | Merge pull request #137 from dotty-staging/change/higher-kindedDmitry Petrashko2014-07-0939-678/+888
|\ \ | | | | | | Change/higher kinded
| * | Added test case for LMS inspired HK code.Martin Odersky2014-06-261-0/+43
| | | | | | | | | | | | Closes #94.
| * | Improved documentationMartin Odersky2014-06-263-5/+17
| | | | | | | | | | | | Added explanations where suggested by Adriaan in his review.
| * | Bring LambdaClass inline with its doc comment.Martin Odersky2014-06-261-4/+3
| | | | | | | | | | | | | | | Avoid special treating TermRef, as this is not demanded by the comment and does not change any of the test outcomes.
| * | Avoid crashing on name tests when name is empty.Martin Odersky2014-06-261-4/+4
| | | | | | | | | | | | Guard every occurrence of name.head with a test whether name.length > 0
| * | Avoid caching values that depend on typevar state.Martin Odersky2014-06-204-27/+66
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | TypeVars flip from the initial state, where underlying == origin to the final state where underlying == inst. This flip can invalidate information that depends on the underlying type of a TypeVar. Since we do not know when the flip occurs, we need to avoid keeping any such information in a cache. The commit makes three caches depend on a new value: typerState.ephemeral. The value is set to `true` each time we follow the underlying type of a TypeVar, and this disables cached information to be retained. A test case for this commit is t2693.scala. This test passes typechecking with the previous commit, but fails in -Ycheck:front because of stale cache info in an "#Apply" typeref. The present commit fixes that.
| * | Make refines work for aliasesMartin Odersky2014-06-201-17/+21
| | | | | | | | | | | | refines needs to be made more stable, so that also aliases and derefernces typevars are recognized as prefixes.
| * | Add missing case where isHKSubType is neededMartin Odersky2014-06-201-4/+5
| | | | | | | | | | | | Was not called when comparing a named type with an #Apply projection. The commit fixes this.
| * | Fixes to lambda abstractionMartin Odersky2014-06-194-6/+17
| | | | | | | | | | | | | | | | | | 1) Honor variance of Apply and $hkArgs when instantiating them 2) Eta-lifting a higher-kinded type is straight eta expansion, no arguments are applied.
| * | Prevent a source of CyclicReference in refined printerMartin Odersky2014-06-191-1/+1
| | |
| * | Delete old, disabled code in TypeComparerMartin Odersky2014-06-181-284/+1
| | |
| * | Handling higher-kinded types with lambdasMartin Odersky2014-06-1823-345/+430
| | | | | | | | | | | | | | | Switch to the new scheme where higher-kinded types (and also some polymorphic type aliases) are represented as instances of Lambda traits.
| * | Fixing subtyping of refined typesMartin Odersky2014-06-151-40/+146
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Refined type subtyping needs to take into account all information that was seen about members of both refined types. This is handled by storing context info in `pendingRefinedBases` and making use of this to selective rebase qualifiers when comparing refined types. Note: This commit fails in pos/collections and dotc/ast, presumably because of bad interaction between the refined subtyping and the "matchingNames" logic (which will go away).
| * | More explanations for -Ycheck failures.Martin Odersky2014-06-131-2/+8
| | | | | | | | | | | | | | | In case of "types differ" failure, explain why original and retyped type are not subtypes of each other.
| * | Fix to printing type parameters.Martin Odersky2014-06-132-4/+4
| | | | | | | | | | | | | | | Printing a type parameter reference `A#T` now only reduces to `T` if `A` is some `B.this.type`.
| * | More careful with lookupRefinedMartin Odersky2014-06-131-2/+31
| | | | | | | | | | | | | | | Avoid to reduce projections `A{ ... }#T` to aliases if the alias would refer to abstract members of the refinement type.
| * | Harden allOverriddenSymbolsMartin Odersky2014-06-122-2/+7
| | | | | | | | | | | | | | | Now also works for symbols that are not class members (and returns Iterator.empty for them).
| * | Make Lambda#Apply a type field instead of a type parameter.Martin Odersky2014-06-121-2/+5
| | | | | | | | | | | | | | | | | | Apply cannot be treated as a type parameter because it does not count towards the number of legal arguments in an instantiation of a higher-kinded type.
| * | Optionally check variance of Lambda classes.Martin Odersky2014-06-122-3/+21
| | | | | | | | | | | | | | | Make sure that Lambda Arg refinements have the same variance as the Lambda classes they instantiate. Controlled by a Config parameter.
| * | Fix RefinementType#memberMartin Odersky2014-06-121-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | Type members used to always pick the last refined info for a type name. This is incorrect, as a type might have several refinements for the same type name, which are not necessarily subsumed by the last one. We now only pick the last one if it is an alias type (assuming we check for conflicts elsewhere).
| * | Fixing hashing for RefinedThis types.Martin Odersky2014-06-122-3/+3
| | | | | | | | | | | | ... to bring it in sync with equals.
| * | Add isLambda... testsMartin Odersky2014-06-122-0/+40
| | | | | | | | | | | | Testing whether a type is (a subtype of) a Lambda class.
| * | Names and definitions for LambdasMartin Odersky2014-06-124-13/+81
| | | | | | | | | | | | | | | Adding names and definitions for the Lambda scheme to hk types. Also add HigherKinded flag for HK type parameters and abstract types.
| * | Change definition of isLegalPrefix so that it allows projecting on an ↵Martin Odersky2014-06-126-7/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | abstract type. This is needed to make the encoding og higher-kinded types work. E.g. Rep[Int] would be represented as Rep { type Arg$0 = Int } # Apply where Apply is an abstract member of the base class Lambfa$I of Rep.
* | | Merge pull request #138 from folone/masterDmitry Petrashko2014-06-233-4/+5
|\ \ \ | | | | | | | | Use the final scala 2.11.
| * | | Use the final scala 2.11.George Leontiev2014-06-233-4/+5
|/ / /
* | | Merge pull request #136 from dotty-staging/fix/systematic-prototypesodersky2014-06-2091-69/+502
|\| | | | | | | | Fix/systematic prototypes
| * | Avoid classtype checking for refinements.Martin Odersky2014-05-303-1/+75
| | | | | | | | | | | | | | | | | | In a refinement type T { R } we do not need T to be a class. But analyzing the refeinement type will create a temporary class type. This refinement class has to be treated specially in what concerns parent types.
| * | Simplify result handling in FunProto.Martin Odersky2014-05-304-32/+14
| | | | | | | | | | | | | | | | | | Following the example of SelectionProto, we now always hide the result in a FunProto behind an IgnoreProto. This avoids a special case retry with a weaker FunProto in tryInsertApplyOrImplicit.
| * | Always ignore type in selectionProtoMartin Odersky2014-05-303-5/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The type of a SelectionProto needs to be ignorable because there might be an implicit conversion on the selection. E.g. implicit def a2b(x: A): B = ??? val x: { a: A } = ??? val b: B = x.a This was previously handled by allowing implicit conversions in compatibility checks. But it turns out we can afford to ignore the type of a selectProto and unignore on ambiguities later.
| * | Reclassifying testsMartin Odersky2014-05-304-9/+11
| | |
| * | Triage of tests t27xx-t29xx.Martin Odersky2014-05-3039-4/+6
| | |
| * | tests t26xxMartin Odersky2014-05-3016-0/+286
| | |
| * | typedTyped needs to maintain Mode.Martin Odersky2014-05-304-3/+33
| | | | | | | | | | | | | | | The first part of a type ascription e: T can be a pattern or an expression. The mode has to be kept depending on what it was on the outside.
| * | Fix of t2660.Martin Odersky2014-05-301-1/+9
| | | | | | | | | | | | | | | Auxiliary constructors need to be wrapped in the type parameters of the primary constructor. Otherwise they will not take part in type inference.
| * | Fix of t2591.Martin Odersky2014-05-303-2/+7
| | | | | | | | | | | | | | | | | | | | | Needed to wrap a dummyTreeOfType in a TypedSplice to prevent re-typechecking. (In fact, the "tree without pos" check revealed a deeper problem: DummyTrees of types could be typed again, but without the surrounding TypedSplice, the originally stored type would be forgotten and Null would be returned.
| * | Added t25xx testsMartin Odersky2014-05-306-0/+70
| | |
| * | Fix of t2504Martin Odersky2014-05-3010-100/+54
| | | | | | | | | | | | | | | | | | | | | | | | | | | Another problem where we need to insert an implicit on the result type of complex operation. Two additions: (1) If adapt fails, we now try with a weaker FunProto without result type, thus allowing for an additional implicit cpmversion on the result. (2) An Application in a committable context will not fail if the result type does not match the expected one. The problem will be simply deferred in that case.
| * | Reporter fixMartin Odersky2014-05-301-6/+7
| | | | | | | | | | | | | | | | | | This fixes a bug introuced by 7754c1ee6c4230e424fd99b820471dbd2c1c8390. The reporter state need to be reset undconditionally in a tryWithFallback.
| * | Refinements in diagnosticsMartin Odersky2014-05-303-5/+15
| | | | | | | | | | | | | | | | | | 1) glb/lub's are reported to subtyping printer instead of typr 2) Null arguments of function protos are printed with their types (views sometimes are transformed into these).