File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
compiler/src/dotty/tools/dotc/cc Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -66,8 +66,9 @@ extension (tree: Tree)
6666 refs
6767
6868 /** The type representing the capture set of @retains, @retainsCap or @retainsByName annotation. */
69- def retainedSet (using Context ): Type = {
70- if tree.symbol.maybeOwner == defn.RetainsCapAnnot then
69+ def retainedSet (using Context ): Type =
70+ val rcap = defn.RetainsCapAnnot
71+ if tree.symbol == rcap || tree.symbol.maybeOwner == rcap then
7172 defn.captureRoot.termRef
7273 else tree match
7374 case Apply (TypeApply (_, refs :: Nil ), _) => refs.tpe
@@ -76,7 +77,6 @@ extension (tree: Tree)
7677 case AppliedType (_, refs :: Nil ) => refs
7778 case _ => NoType
7879 case _ => NoType
79- }// .showing(i"retained from $tree = $result")
8080
8181extension (tp : Type )
8282
You can’t perform that action at this time.
0 commit comments