| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
| |
|
|
|
|
| |
check that argument lists have same length.
|
| |
|
| |
|
|
|
|
| |
The new scheme is robust even when following freshky instantiated type variables. These did not show up in the old varianceMap scheme.
|
| |
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
| |
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).
|
|
|
|
| |
Used to be "cyclic reference involving val <import>". Now prints import statement that caused the error.
|
| |
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
needed a lot for implicit search.
We need to use a less common name for Predef.conforms!
|
|
|
|
| |
Needed for implicit search, because some implicits might be UniqueRefs, not SymDenotations
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
| |
|
|
|
|
| |
Indicate only thhose alternatives that remain after narrowing.
|
|
|
|
| |
Now handled: ConstantTypes, MethodParam, PolyParam
|
|
|
|
| |
Problem is that adaptInterpolated might fail without producing an error. In that case we have to fall back.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
| |
Need to take into account type parameters of inherited methods, which have to be instantiated with the type parameters of the current method.
|
|
|
|
| |
The test did not fire if the set of class symbols of the searched-for type was empty.
|
|
|
|
|
|
|
|
|
|
|
|
| |
Nullary methods are always as specific as non-nullary ones.
Needed so that
foo()
takes precdennce over
foo(x: T)
|
|
|
|
| |
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.
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
| |
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).
|
| |
|
|
|
|
| |
Need to pass a current context to be able to find instances of typevars.
|
| |
|
|
|
|
| |
Thus constraining the search space.
|
|
|
|
|
|
| |
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.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Need to handle the case of a curried method with result type
(Ts)T
and expected type
Ts => T
|
|
|
|
| |
Previously, such classes just had ProductN as parent, which is not a subtype of AnyRef.
|
|
|
|
| |
in closures.
|
|
|
|
|
| |
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.
|
| |
|