aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Making some traces conditional on printers being enabled.Martin Odersky2014-01-135-9/+23
|
* Follow through multople layers of instantiation when printing a typevarMartin Odersky2014-01-131-1/+1
|
* When typing a function value (xs) => T with a function type as exp[ected type,Martin Odersky2014-01-131-0/+3
| | | | check that argument lists have same length.
* When instantiating a type var, need to map back from polyparams to typevars.Martin Odersky2014-01-132-2/+14
|
* Extend type maps and type accumulators to prototypesMartin Odersky2014-01-132-0/+39
|
* Redo isFullyDefinedAccumulatorMartin Odersky2014-01-131-22/+43
| | | | The new scheme is robust even when following freshky instantiated type variables. These did not show up in the old varianceMap scheme.
* fix for comparing or-types.Martin Odersky2014-01-111-1/+1
|
* Avoid cyclic references using imports.Martin Odersky2014-01-111-1/+1
| | | | The example is the current dotctest. import Symbols._ comes well before the definition of Symbols. Without the fix, it caused a cyclic reference error. But it seems reasonable to wait with the import until the class is fully elaborated.
* Handling refined types.Martin Odersky2014-01-112-15/+23
| | | | | | | | A refined type P { refinement } is expanded to a class class <refined> extends P { refinement } for type-checking. The problem is that the parent P does not always have a constructor. So we need to leave the parent as a type and add a special case to classDefSig that handles it.
* Handles setters where the getter takes implicit or other parameters.Martin Odersky2014-01-111-16/+20
| | | | | | | | | | | Now legal: def foo(implicit ...) = ... def foo_=(x: T): Unit = .... foo = ... And it works even without the implicit (need to clarify the spec on this count).
* Better reporting of cyclic references involving imports.Martin Odersky2014-01-114-263/+468
| | | | Used to be "cyclic reference involving val <import>". Now prints import statement that caused the error.
* Strip implicit parameters when deciding specifity of methods.Martin Odersky2014-01-112-10/+16
|
* Type comparison tweak.Martin Odersky2014-01-102-0/+2
| | | | We assume that two types A.this.C and B.this.C where C is the same class symbol, yet A and B are unrelated, are equal (i.e. mutually subtypes of each other). Such types comes up in situations where the self type of a type is different from the enclosing class.
* Removing conforms from StdNames because it shadows Predef.conforms, which is ↵Martin Odersky2014-01-102-5/+5
| | | | | | needed a lot for implicit search. We need to use a less common name for Predef.conforms!
* Mover termRef/typeRef and friends up to Denotation.Martin Odersky2014-01-103-21/+35
| | | | Needed for implicit search, because some implicits might be UniqueRefs, not SymDenotations
* Ensure completion before computing non-private members.Martin Odersky2014-01-101-0/+1
|
* Add type parameters to synthetic constructors.Martin Odersky2014-01-102-2/+6
|
* Add a constructor to class Any, so that it can be inherited.Martin Odersky2014-01-103-3/+345
|
* Ensure progress in checkAccessibleMartin Odersky2014-01-091-1/+1
|
* Refine eligibilityMartin Odersky2014-01-093-3/+8
| | | | Because eligibility is tested in a context which is different from the implicit search context, we cannot assume that type variables have their constraint recorded. So we have to approximate subtype tests with PolyParams which are not in the constraint set.
* Avoid dropping errors in typedApplyMartin Odersky2014-01-091-8/+6
| | | | | | | | | | | | Previous logic dropped some errors on retry, when typedUnadapted did not change qual. Also: Special case repeated parameters in isAsSpecific. Those have to be converted to the underlying parameters, so that (xs: Int*)T is as specific as (xs: Long*)T
* Special case Unit for result type conformance check.Martin Odersky2014-01-091-1/+1
|
* Don't do an implicit conversion to Any, AnyRef, or Unit.Martin Odersky2014-01-091-1/+4
|
* Better error message for failed overloading resolution.Martin Odersky2014-01-091-2/+3
| | | | Indicate only thhose alternatives that remain after narrowing.
* Augment namedParts to follow through on some proxy types.Martin Odersky2014-01-092-5/+9
| | | | Now handled: ConstantTypes, MethodParam, PolyParam
* Avoid dropping errors in typedApplyMartin Odersky2014-01-091-1/+5
| | | | Problem is that adaptInterpolated might fail without producing an error. In that case we have to fall back.
* Refactoring Reporter.isSlent -> errorCount, wasSilentMartin Odersky2014-01-092-6/+8
|
* Change namedParts to also include the underlying types of TermRefs.Martin Odersky2014-01-082-3/+6
|
* Mapping over a SelectionProto should give a SelectionProto, not a RefinedType.Martin Odersky2014-01-082-1/+9
|
* Fixing illegal code that should have been flagged by scalac.Martin Odersky2014-01-071-3/+5
|
* New subtype constraint maintenance algorithm.Martin Odersky2014-01-079-55/+106
| | | | | | | | | | Objective: Avoid cycles by detecting all cases where A <: B and B <: A and removing those cases by unifuing A and B. Cycles need to be avoided because they lead to deep subtype recursions.
* Remove debug outputMartin Odersky2014-01-062-19/+6
|
* Fix computation of inherited result types.Martin Odersky2014-01-061-9/+16
| | | | Need to take into account type parameters of inherited methods, which have to be instantiated with the type parameters of the current method.
* Fix divergence test for implicitsMartin Odersky2014-01-061-1/+3
| | | | The test did not fire if the set of class symbols of the searched-for type was empty.
* Change to overloading behaviorMartin Odersky2014-01-065-24/+33
| | | | | | | | | | | | Nullary methods are always as specific as non-nullary ones. Needed so that foo() takes precdennce over foo(x: T)
* Relax isFullyDefined testMartin Odersky2014-01-063-3/+10
| | | | Previously, if forceDegree = noBottom, we failed the test if a type variable was minimized to Null or Nothing. Now we succeed and maximize the type variable instead. It seems Scala2x does soemthing similar, at least the change is needed to make PathResolvers.scala compile.
* Fix to overloading resolution: prioritize non-methods over methods.Martin Odersky2014-01-062-4/+11
| | | | If one alternative is a non-method yet the other is a method (of type PolyType or MethodType), the first alternative is "as specific as" the second.
* Change to computing of unapply patterns.Martin Odersky2014-01-062-4/+5
| | | | | | | | | | | | If scrutinee has a get method with a product result type, assume the product members as pattern arguments only if there are more than one argument patterns. Without this tweak, the pattern Some((x, y)) would not typecheck, as the extractor result type is Option[(S, T)], so normally two patterns of type S and T would be expected. Interestingly, with the tweak we still get a sort of auto-detupling. Some(x, y) would also work (did before the change, and still does now).
* Exclude inaccessible definitions from contextual implicit search.Martin Odersky2014-01-062-2/+5
|
* Make implicit scope work in the presence to TypeVarsMartin Odersky2014-01-063-55/+76
| | | | Need to pass a current context to be able to find instances of typevars.
* Make Settings.scala dotty conformantMartin Odersky2014-01-062-3/+6
|
* Propagate constraints on result type eagerly into implicit search.Martin Odersky2014-01-044-24/+24
| | | | Thus constraining the search space.
* Changes to propagation of wildcardtypesMartin Odersky2014-01-042-5/+7
| | | | | | 1) Selecting from a wildcardtype now gives a wildcard type. Wildcard types are no longer legal as prefixes of NamedTypes. 2) Bound of type variables are proagated into wildcard type approximations.
* Output cleanupsMartin Odersky2014-01-047-9/+15
|
* Fix prinitng of pattern guards in treesMartin Odersky2014-01-041-1/+1
|
* Fix in constrainResultMartin Odersky2014-01-043-2/+6
| | | | | | | | | | Need to handle the case of a curried method with result type (Ts)T and expected type Ts => T
* Add AnyRef parent for case classes that do not have an extends clause.Martin Odersky2014-01-042-3/+5
| | | | Previously, such classes just had ProductN as parent, which is not a subtype of AnyRef.
* Make anonymous methods non-dependent where possible so that they can be used ↵Martin Odersky2014-01-043-12/+16
| | | | in closures.
* Generalize overloading resolution to type arguments.Martin Odersky2014-01-044-30/+49
| | | | | We need to take type arguments + value arguments into account when there are several overloaded alternatives that are all polymorphic and can be instantiated with the type arguments.
* Hardening against a possible NoDenotation has no owner crash.Martin Odersky2014-01-031-1/+1
|