Skip to content

Commit d6915a4

Browse files
committed
Check that the symbol is in fact a term
1 parent e475f4f commit d6915a4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

compiler/src/dotty/tools/dotc/ast/tpd.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1040,7 +1040,7 @@ object tpd extends Trees.Instance[Type] with TypedTreeInfo {
10401040

10411041
/** Is this a symbol that of a local val or parameterless def for which we could get the rhs */
10421042
private def isBinding(sym: Symbol)(implicit ctx: Context): Boolean = {
1043-
sym.exists && !sym.is(Param) && !sym.owner.isClass &&
1043+
sym.isTerm && !sym.is(Param) && !sym.owner.isClass &&
10441044
!(sym.is(Method) && sym.info.isInstanceOf[MethodOrPoly]) // if is a method it is parameterless
10451045
}
10461046
}

0 commit comments

Comments
 (0)