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:
828
828
829
829
def levelOK (elem : Capability )(using Context ): Boolean = elem match
830
830
case elem @ ResultCap (binder) =>
831
- rootLimit == null && ( this . isInstanceOf [ BiMapped ] || isPartOf(binder.resType) )
831
+ rootLimit == null && isPartOf(binder.resType)
832
832
case GlobalCap =>
833
833
rootLimit == null
834
834
case elem : ParamRef =>
835
- this . isInstanceOf [ BiMapped ] || isPartOf(elem.binder.resType)
835
+ isPartOf(elem.binder.resType)
836
836
case _ =>
837
837
if owner.exists then
838
838
val elemVis = elem.visibility
@@ -950,6 +950,9 @@ object CaptureSet:
950
950
abstract class DerivedVar (owner : Symbol , initialElems : Refs )(using @ constructorOnly ctx : Context )
951
951
extends Var (owner, initialElems):
952
952
953
+ override def levelOK (elem : Capability )(using Context ): Boolean =
954
+ true
955
+
953
956
// For debugging: A trace where a set was created. Note that logically it would make more
954
957
// sense to place this variable in Mapped, but that runs afoul of the initialization checker.
955
958
// 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