X-Git-Url: http://git.megacz.com/?p=org.ibex.classgen.git;a=blobdiff_plain;f=src%2Forg%2Fibex%2Fclassgen%2FType.java;fp=src%2Forg%2Fibex%2Fclassgen%2FType.java;h=28c30dd85e9fb7f11df35cabb627ca6d488fd356;hp=b5428ad54135ad9f8e46b9fe02ab2db47f8c8ce2;hb=8e8d0c0cb581b3589370e13b31102d94013d9d9d;hpb=45c5dbeb250d4684ebb28c638ae04e32b3a59f02 diff --git a/src/org/ibex/classgen/Type.java b/src/org/ibex/classgen/Type.java index b5428ad..28c30dd 100644 --- a/src/org/ibex/classgen/Type.java +++ b/src/org/ibex/classgen/Type.java @@ -85,7 +85,7 @@ public abstract class Type implements CGConst { public Type.Array asArray() { return this; } public boolean isArray() { return true; } public String toString() { return base.toString() + "[]"; } - public Type getElementType() { return Type.fromDescriptor(getDescriptor().substring(0, getDescriptor().length()-1)); } + public Type getElementType() { return base; } } public static class Class extends Type.Ref { @@ -115,7 +115,7 @@ public abstract class Type implements CGConst { return p == -1 ? descriptor.substring(1,descriptor.length()-1) : descriptor.substring(p+1,descriptor.length()-1); } private static String _initHelper(String s) { - if (!s.startsWith("L") || !s.endsWith(";")) throw new Error("invalid"); + if (!s.startsWith("L") || !s.endsWith(";")) throw new Error("invalid: " + s); return s; } String[] components() {