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:
930930 deps += cs2
931931
932932 override def tryInclude (elem : Capability , origin : CaptureSet )(using Context , VarState ): Boolean =
933- val present =
933+ val inIntersection =
934934 if origin eq cs1 then cs2.accountsFor(elem)
935935 else if origin eq cs2 then cs1.accountsFor(elem)
936936 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 ))
938942
939943 override def computeApprox (origin : CaptureSet )(using Context ): CaptureSet =
940944 if (origin eq cs1) || (origin eq cs2) then
You can’t perform that action at this time.
0 commit comments