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 3bfb9b8 commit ff80308Copy full SHA for ff80308
compiler/src/dotty/tools/dotc/typer/Typer.scala
@@ -584,7 +584,7 @@ class Typer extends Namer
584
def handlePattern: Tree = {
585
val tpt1 = typedTpt
586
if (!ctx.isAfterTyper && pt != defn.ImplicitScrutineeTypeRef)
587
- constrainPatternType(tpt1.tpe, pt)(ctx.addMode(Mode.GADTflexible))
+ constrainPatternType(SkolemType(tpt1.tpe), pt)(ctx.addMode(Mode.GADTflexible))
588
// special case for an abstract type that comes with a class tag
589
tryWithClassTag(ascription(tpt1, isWildcard = true), pt)
590
}
0 commit comments