X-Git-Url: http://git.megacz.com/?p=org.ibex.classgen.git;a=blobdiff_plain;f=src%2Forg%2Fibex%2Fclassgen%2FConstantPool.java;fp=src%2Forg%2Fibex%2Fclassgen%2FConstantPool.java;h=67f4245cd3e03e7fd11c6d4f77c20a80ecf4d80e;hp=f3fbdf0c8d8956fc2d6652cfb8d0596b14d08666;hb=d54f8660ded621af4065b8907255c162df0f6eb0;hpb=7b7d64efd6761d48aabe652945e907e9309bccd0 diff --git a/src/org/ibex/classgen/ConstantPool.java b/src/org/ibex/classgen/ConstantPool.java index f3fbdf0..67f4245 100644 --- a/src/org/ibex/classgen/ConstantPool.java +++ b/src/org/ibex/classgen/ConstantPool.java @@ -219,7 +219,7 @@ class ConstantPool implements CGConst { return ent; } - if (o instanceof Type.Class) { ent = new ClassEnt(((Type.Class)o).internalForm()); } + if (o instanceof Type.Ref) { ent = new ClassEnt(((Type.Ref)o).internalForm()); } else if (o instanceof String) { ent = new StringLitEnt((String)o); } else if (o instanceof Integer) { ent = new IntLitEnt(((Integer)o).intValue()); } else if (o instanceof Float) { ent = new FloatLitEnt(((Float)o).floatValue()); } @@ -240,7 +240,7 @@ class ConstantPool implements CGConst { ent = new MemberEnt(tag, m.getDeclaringClass(), m.name, m.getTypeDescriptor()); } else { - throw new IllegalArgumentException("Unknown type passed to add"); + throw new IllegalArgumentException("Unknown type " + o + " passed to add"); } int spaces = ent.slots();