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.
1 parent c51a2c0 commit 16d1856Copy full SHA for 16d1856
compiler/src/dotty/tools/dotc/typer/Typer.scala
@@ -1317,7 +1317,9 @@ class Typer extends Namer
1317
}
1318
1319
def typedMatchTypeTree(tree: untpd.MatchTypeTree, pt: Type)(implicit ctx: Context): Tree = {
1320
- val bound1 = typed(tree.bound)
+ val bound1 =
1321
+ if (tree.bound.isEmpty && isFullyDefined(pt, ForceDegree.none)) TypeTree(pt)
1322
+ else typed(tree.bound)
1323
val sel1 = typed(tree.selector)
1324
val pt1 = if (bound1.isEmpty) pt else bound1.tpe
1325
val cases1 = tree.cases.mapconserve(typedTypeCase(_, sel1.tpe, pt1))
0 commit comments