Skip to content

Commit 5fd589e

Browse files
committed
Don't add capture set variables to Caps_Root
1 parent 05ba906 commit 5fd589e

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

compiler/src/dotty/tools/dotc/cc/Setup.scala

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -488,7 +488,8 @@ extends tpd.TreeTraverser:
488488
sym == defn.AnyClass
489489
// we assume Any is a shorthand of {cap} Any, so if Any is an upper
490490
// bound, the type is taken to be impure.
491-
else superTypeIsImpure(tp.superType)
491+
else
492+
sym != defn.Caps_Root && superTypeIsImpure(tp.superType)
492493
case tp: (RefinedOrRecType | MatchType) =>
493494
superTypeIsImpure(tp.underlying)
494495
case tp: AndType =>

0 commit comments

Comments
 (0)