You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Typer#escapingRefs: don't let the types of lower bounds escape
In 0efa171 I changed the definition of
NamedPartsAccumulator to exclude lower bounds as this is required for the
implicit search, but NamedPartsAccumulator is also used by
Typer#escapingRefs so in the following code:
class Foo[T](x:T)
val z = {
class C
new Foo(new C)
}
the type of z was inferred to be Foo[C] instead of Foo.
To avoid this, NamedPartsAccumulator will only exclude lower bounds if
the parameter excludeLowerBounds is explicitely set to true.
No test because there is no way to detect that a type has escaped, this
might be something that could be added to TreeChecker.
0 commit comments