diff options
Diffstat (limited to 'sources/scalac/ast/TreeGen.java')
-rw-r--r-- | sources/scalac/ast/TreeGen.java | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/sources/scalac/ast/TreeGen.java b/sources/scalac/ast/TreeGen.java index c5800f5a68..1ad0d93b45 100644 --- a/sources/scalac/ast/TreeGen.java +++ b/sources/scalac/ast/TreeGen.java @@ -1131,6 +1131,9 @@ public class TreeGen implements Kinds, Modifiers, TypeTags { } public Tree Cons(int pos, Type elemtpe, Tree hd, Tree tl) { + assert hd.type().isSubType(elemtpe): elemtpe + " -- " + hd; + assert tl.type().isSubType(definitions.LIST_TYPE(elemtpe)): + elemtpe + " -- " + tl; return New(mkPrimaryConstr(pos, global.definitions .getClass( Names.scala_COLONCOLON ), |