Fix javaClass property for long and double

#KT-3046 Fixed
This commit is contained in:
Natalia.Ukhorskaya
2012-11-19 21:15:15 +04:00
parent 7bb7445c57
commit 900788a8e0
3 changed files with 25 additions and 2 deletions
@@ -44,13 +44,12 @@ public class JavaClassProperty implements IntrinsicMethod {
StackValue receiver,
@NotNull GenerationState state
) {
receiver.put(receiver.type, v);
JvmPrimitiveType primitiveType = JvmPrimitiveType.getByAsmType(receiver.type);
if (primitiveType != null) {
v.pop();
v.getstatic(primitiveType.getWrapper().getAsmType().getInternalName(), "TYPE", "Ljava/lang/Class;");
}
else {
receiver.put(receiver.type, v);
v.invokevirtual("java/lang/Object", "getClass", "()Ljava/lang/Class;");
}
return StackValue.onStack(AsmTypeConstants.getType(Class.class));