summaryrefslogtreecommitdiff
path: root/sources/scalac
diff options
context:
space:
mode:
Diffstat (limited to 'sources/scalac')
-rw-r--r--sources/scalac/ast/TreeGen.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/sources/scalac/ast/TreeGen.java b/sources/scalac/ast/TreeGen.java
index 987bf8b743..c5800f5a68 100644
--- a/sources/scalac/ast/TreeGen.java
+++ b/sources/scalac/ast/TreeGen.java
@@ -241,7 +241,7 @@ public class TreeGen implements Kinds, Modifiers, TypeTags {
/** Builds a default zero value according to given type. */
public Tree mkDefaultValue(int pos, Type type) {
- if (type.isSubType(definitions.ANYREF_TYPE())) return mkNullLit(pos);
+ if (definitions.ALLREF_TYPE().isSubType(type)) return mkNullLit(pos);
switch (type.unbox()) {
case UnboxedType(int tag): return mkDefaultValue(pos, tag);
}