Skip to content

Commit 229982f

Browse files
dwijnandmichelou
authored andcommitted
Add a test case there the pattern has a bound
Looking at the log of constr, gadts, and gadtsConstr there seems to be no change in behaviour compared to before the implementation change in PatternTypeConstrainer.
1 parent 21c9336 commit 229982f

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

tests/pos/i14832.scala

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
class Box[V](val value: V)
2+
3+
class Test:
4+
def value: Box["text"] = Box("text")
5+
6+
def test: String = value match
7+
case b: Box[_ <: String] => b.value

0 commit comments

Comments
 (0)