Skip to content

Commit 8495c06

Browse files
committed
filtering out NoSymbol to avoid unsound bounds
1 parent a615f2c commit 8495c06

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
@@ -322,7 +322,7 @@ final class ProperGadtConstraint private(
322322
override def addToConstraint(path: PathType)(using Context): Boolean = isConstrainablePath(path) && {
323323
import NameKinds.DepParamName
324324
val pathType = path.widen
325-
val typeMembers = constrainableTypeMembers(path)
325+
val typeMembers = constrainableTypeMembers(path).filterNot(_.symbol eq NoSymbol)
326326

327327
gadts.println(i"> trying to add $path into constraint ...")
328328
gadts.println(i" path.widen = $pathType")

0 commit comments

Comments
 (0)