Skip to content

Commit eabd95a

Browse files
committed
Fix isCompiletimeAppliedType for NoDenotation types
A NoDenotation throws an AssertionError when getting its owner. Instead of crashing when passed a NoDenotation (which may happen in certain erroneous cases such as tests/neg/i3083.scala), return false.
1 parent 1d3e473 commit eabd95a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -918,7 +918,7 @@ class Definitions {
918918
tpnme.Not, tpnme.Xor, tpnme.And, tpnme.Or
919919
).contains(sym.name)
920920

921-
isPackageObjectAppliedType || isIntAppliedType || isBooleanAppliedType
921+
sym.isType && (isPackageObjectAppliedType || isIntAppliedType || isBooleanAppliedType)
922922
}
923923

924924

0 commit comments

Comments
 (0)