We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 25d96b6 commit d5be8dbCopy full SHA for d5be8db
compiler/src/dotty/tools/dotc/cc/CaptureSet.scala
@@ -532,7 +532,9 @@ object CaptureSet:
532
* of this set. The universal set {cap} is a sound fallback.
533
*/
534
final def upperApprox(origin: CaptureSet)(using Context): CaptureSet =
535
- if isConst || elems.exists(_.isRootCapability) then this
+ if isConst then this
536
+ else if elems.exists(_.isRootCapability) then
537
+ CaptureSet(elems.filter(_.isRootCapability).toList*)
538
else if computingApprox then universal
539
else
540
computingApprox = true
0 commit comments