ExpressionCodegen: take EnumEntry type from containingDeclarationDescriptor

JavaDescriptorResolver: pass to propertyDescriptor correct value of isObject parameter
This commit is contained in:
Natalia.Ukhorskaya
2012-08-22 14:29:38 +04:00
parent 6740a712d8
commit 3d9ad3f6cb
9 changed files with 63 additions and 9 deletions
@@ -0,0 +1,5 @@
package test;
public enum simpleJavaEnum {
A;
}
@@ -0,0 +1,5 @@
import test.*
fun box() =
if (simpleJavaEnum.A.toString() == "A") "OK"
else "fail"
@@ -0,0 +1,18 @@
package test;
import java.lang.Override;
import java.lang.String;
public enum simpleJavaEnumWithFunction {
A {
@Override
public String repr() {
return "A";
}
},
B;
public String repr() {
return "ololol" + toString();
}
}
@@ -0,0 +1,5 @@
import test.simpleJavaEnumWithFunction.*
fun box() =
if (A.repr() == "A" && B.repr() == "olololB") "OK"
else "fail"
@@ -0,0 +1,5 @@
package test;
public enum simpleJavaEnumWithStaticImport {
A;
}
@@ -0,0 +1,5 @@
import test.simpleJavaEnumWithStaticImport.A
fun box() =
if (A.toString() == "A") "OK"
else "fail"