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 9f55efa commit 5702af4Copy full SHA for 5702af4
compiler/src/dotty/tools/dotc/core/GadtConstraint.scala
@@ -362,7 +362,6 @@ final class ProperGadtConstraint private(
362
case tv: TypeVar => tv.origin
363
case null => tp
364
}
365
- case tv: TypeVar => if isUpper then defn.AnyType else defn.NothingType
366
case tp => tp
367
368
loop(tp)
tests/pos/pdgadt-wildcard.scala renamed to tests/neg/pdgadt-wildcard.scala
@@ -3,6 +3,6 @@ case class Inv[X](x: X) extends Expr { type T = X }
3
case class Inv2[X](x: X) extends Expr { type T >: X }
4
5
def eval(e: Expr): e.T = e match
6
- case Inv(x) => x
+ case Inv(x) => x // limitation // error
7
case Inv2(x) => x
8
0 commit comments