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 e9d87e0 commit 0824df5Copy full SHA for 0824df5
compiler/src/dotty/tools/dotc/typer/Typer.scala
@@ -1963,7 +1963,8 @@ class Typer extends Namer with TypeAssigner with Applications with Implicits wit
1963
case _: RefTree | _: Literal
1964
if !isVarPattern(tree) &&
1965
!(tree.tpe <:< pt)(ctx.addMode(Mode.GADTflexible)) =>
1966
- checkCanEqual(pt, wtp, tree.pos)(ctx.retractMode(Mode.Pattern))
+ val tp1 :: tp2 :: Nil = harmonizeTypes(pt :: wtp :: Nil)
1967
+ checkCanEqual(tp1, tp2, tree.pos)(ctx.retractMode(Mode.Pattern))
1968
case _ =>
1969
}
1970
tree
0 commit comments