We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 344b055 + 0424e5b commit b253252Copy full SHA for b253252
src/dotty/tools/dotc/typer/TypeAssigner.scala
@@ -43,7 +43,7 @@ trait TypeAssigner {
43
}
44
def apply(tp: Type) = tp match {
45
case tp: TermRef if toAvoid(tp) && variance > 0 =>
46
- apply(tp.info)
+ apply(tp.info.widenExpr)
47
case tp: TypeRef if (forbidden contains tp.symbol) || toAvoid(tp.prefix) =>
48
tp.info match {
49
case TypeAlias(ref) =>
tests/pos/i0306.scala
@@ -0,0 +1,17 @@
1
+object bar {
2
+
3
+ class C[T <: Seq[_]]
4
5
+ val x: AnyRef = new C
6
7
+ val y = x match {
8
+ case x: C[u] =>
9
+ def xx: u = xx
10
+ xx
11
+ }
12
13
+ val z= {
14
+ def xx: String = xx
15
16
17
+}
0 commit comments