Skip to content

Commit b7ce616

Browse files
committed
GADT: Use isPatternBound, ofc...
1 parent 22be802 commit b7ce616

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ class GadtConstraint private (
8383
// B$2 had info <: B$1 and fullBounds <: B$1
8484
// We can use the info of B$2 to drop the lower-bound of B$1
8585
// and return non-bidirectional bounds B$1 <: X and B$2 <: B$1.
86-
if tp.name.is(UniqueName) && !tp.info.hiBound.isExactlyAny && self <:< tp.info.hiBound => acc
86+
if tp.symbol.isPatternBound && !tp.info.hiBound.isExactlyAny && self <:< tp.info.hiBound => acc
8787
case tp => acc | tp
8888
}
8989

0 commit comments

Comments
 (0)