File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
compiler/src/dotty/tools/dotc/cc Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -930,11 +930,15 @@ object CaptureSet:
930
930
deps += cs2
931
931
932
932
override def tryInclude (elem : Capability , origin : CaptureSet )(using Context , VarState ): Boolean =
933
- val present =
933
+ val inIntersection =
934
934
if origin eq cs1 then cs2.accountsFor(elem)
935
935
else if origin eq cs2 then cs1.accountsFor(elem)
936
936
else true
937
- ! present || accountsFor(elem) || addNewElem(elem)
937
+ ! inIntersection
938
+ || accountsFor(elem)
939
+ || addNewElem(elem)
940
+ && ((origin eq cs1) || cs1.tryInclude(elem, this ))
941
+ && ((origin eq cs2) || cs2.tryInclude(elem, this ))
938
942
939
943
override def computeApprox (origin : CaptureSet )(using Context ): CaptureSet =
940
944
if (origin eq cs1) || (origin eq cs2) then
You can’t perform that action at this time.
0 commit comments