summaryrefslogtreecommitdiff
path: root/sources/scalac/transformer
diff options
context:
space:
mode:
Diffstat (limited to 'sources/scalac/transformer')
-rw-r--r--sources/scalac/transformer/TypesAsValuesPhase.java5
1 files changed, 4 insertions, 1 deletions
diff --git a/sources/scalac/transformer/TypesAsValuesPhase.java b/sources/scalac/transformer/TypesAsValuesPhase.java
index 6eea866c11..11dcaa2487 100644
--- a/sources/scalac/transformer/TypesAsValuesPhase.java
+++ b/sources/scalac/transformer/TypesAsValuesPhase.java
@@ -588,6 +588,7 @@ public class TypesAsValuesPhase extends Phase {
}
Ancestor[][] ancestors = computeAncestors(clsSym);
+ int[] ancestorCode = getAncestorCode(ancestors);
Tree outer = isNestedClass(clsSym)
? (clsSym.owner().isClass()
@@ -603,7 +604,9 @@ public class TypesAsValuesPhase extends Phase {
gen.mkIntLit(pos, mCount),
gen.mkIntLit(pos, pCount),
gen.mkIntLit(pos, ancestors.length),
- mkNewIntLitArray(pos, getAncestorCode(ancestors), owner)
+ ancestorCode.length == 0
+ ? gen.mkNullLit(pos)
+ : mkNewIntLitArray(pos, getAncestorCode(ancestors), owner)
};
Symbol tcConst = defs.TYPECONSTRUCTOR_CLASS.primaryConstructor();