Skip to content

Commit 5702af4

Browse files
committed
remove workaround for type variable
1 parent 9f55efa commit 5702af4

File tree

2 files changed

+1
-2
lines changed

2 files changed

+1
-2
lines changed

compiler/src/dotty/tools/dotc/core/GadtConstraint.scala

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -362,7 +362,6 @@ final class ProperGadtConstraint private(
362362
case tv: TypeVar => tv.origin
363363
case null => tp
364364
}
365-
case tv: TypeVar => if isUpper then defn.AnyType else defn.NothingType
366365
case tp => tp
367366

368367
loop(tp)

tests/pos/pdgadt-wildcard.scala renamed to tests/neg/pdgadt-wildcard.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@ case class Inv[X](x: X) extends Expr { type T = X }
33
case class Inv2[X](x: X) extends Expr { type T >: X }
44

55
def eval(e: Expr): e.T = e match
6-
case Inv(x) => x
6+
case Inv(x) => x // limitation // error
77
case Inv2(x) => x
88

0 commit comments

Comments
 (0)