Fix android build

This commit is contained in:
Natalia.Ukhorskaya
2012-08-14 12:25:06 +04:00
parent 71208de565
commit 98ed261eb3
3 changed files with 19 additions and 1 deletions
@@ -1031,7 +1031,7 @@ public class ImplementationBodyCodegen extends ClassBodyCodegen {
iv.putstatic(implClass, enumConstant.getName(), "L" + implClass + ";");
iv.astore(TYPE_OBJECT);
}
iv.putstatic(myAsmType.getClassName(), "$VALUES", arrayAsmType.getDescriptor());
iv.putstatic(myAsmType.getInternalName(), "$VALUES", arrayAsmType.getDescriptor());
}
public static void generateInitializers(@NotNull ExpressionCodegen codegen, @NotNull InstructionAdapter iv, @NotNull List<JetDeclaration> declarations,
@@ -0,0 +1,14 @@
package test
enum class Season {
WINTER
SPRING
SUMMER
AUTUMN
}
fun foo(): Season = Season.SPRING
fun box() =
if (foo() == Season.SPRING) "OK"
else "fail"
@@ -73,6 +73,10 @@ public class EnumGenTest extends CodegenTestCase {
blackBoxFile("enum/simple.kt");
}
public void testSimpleEnumInPackage() throws NoSuchFieldException, IllegalAccessException {
blackBoxFile("enum/inPackage.kt");
}
public void testAsReturnExpression() {
blackBoxFile("enum/asReturnExpression.kt");
}