Skip to content

Commit ecc8ba3

Browse files
committed
Refine isField test
Refine the isField test in SymUtils to exclude non-members and phantom symbols
1 parent 97927ac commit ecc8ba3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

compiler/src/dotty/tools/dotc/core/SymUtils.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -313,7 +313,7 @@ class SymUtils:
313313
}
314314

315315
def isField(using Context): Boolean =
316-
self.isTerm && !self.is(Method)
316+
self.isTerm && !self.isOneOf(Method | PhantomSymbol | NonMember)
317317

318318
def isEnumCase(using Context): Boolean =
319319
self.isAllOf(EnumCase, butNot = JavaDefined)

0 commit comments

Comments
 (0)