File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
compiler/src/dotty/tools/dotc/cc Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -828,11 +828,11 @@ object CaptureSet:
828828
829829 def levelOK (elem : Capability )(using Context ): Boolean = elem match
830830 case elem @ ResultCap (binder) =>
831- rootLimit == null && ( this . isInstanceOf [ BiMapped ] || isPartOf(binder.resType) )
831+ rootLimit == null && isPartOf(binder.resType)
832832 case GlobalCap =>
833833 rootLimit == null
834834 case elem : ParamRef =>
835- this . isInstanceOf [ BiMapped ] || isPartOf(elem.binder.resType)
835+ isPartOf(elem.binder.resType)
836836 case _ =>
837837 if owner.exists then
838838 val elemVis = elem.visibility
@@ -950,6 +950,9 @@ object CaptureSet:
950950 abstract class DerivedVar (owner : Symbol , initialElems : Refs )(using @ constructorOnly ctx : Context )
951951 extends Var (owner, initialElems):
952952
953+ override def levelOK (elem : Capability )(using Context ): Boolean =
954+ true
955+
953956 // For debugging: A trace where a set was created. Note that logically it would make more
954957 // sense to place this variable in Mapped, but that runs afoul of the initialization checker.
955958 // val stack = if debugSets && this.isInstanceOf[Mapped] then (new Throwable).getStackTrace().take(20) else null
You can’t perform that action at this time.
0 commit comments