Skip to content

Commit 8e29192

Browse files
committed
Handle capability paths from static roots
1 parent 37b93cc commit 8e29192

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

compiler/src/dotty/tools/dotc/cc/CheckCaptures.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -762,7 +762,7 @@ class CheckCaptures extends Recheck, SymTransformer:
762762
* a PathSelectionProto.
763763
*/
764764
override def selectionProto(tree: Select, pt: Type)(using Context): Type =
765-
if tree.symbol.isStatic then super.selectionProto(tree, pt)
765+
if tree.symbol.is(Package) then super.selectionProto(tree, pt)
766766
else PathSelectionProto(tree, pt)
767767

768768
/** A specialized implementation of the selection rule.

0 commit comments

Comments
 (0)