Minor, add test on bound reference to enum entry member
This commit is contained in:
@@ -0,0 +1,13 @@
|
|||||||
|
enum class E {
|
||||||
|
A, B;
|
||||||
|
|
||||||
|
fun foo() = this.name
|
||||||
|
}
|
||||||
|
|
||||||
|
fun box(): String {
|
||||||
|
val f = E.A::foo
|
||||||
|
if (f() != "A") return "Fail 1: ${f()}"
|
||||||
|
if (f != E.B::foo) return "Fail 2"
|
||||||
|
|
||||||
|
return "OK"
|
||||||
|
}
|
||||||
@@ -1470,6 +1470,12 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest {
|
|||||||
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/callableReference/bound"), Pattern.compile("^(.+)\\.kt$"), true);
|
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/callableReference/bound"), Pattern.compile("^(.+)\\.kt$"), true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("enumEntryMember.kt")
|
||||||
|
public void testEnumEntryMember() throws Exception {
|
||||||
|
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/bound/enumEntryMember.kt");
|
||||||
|
doTest(fileName);
|
||||||
|
}
|
||||||
|
|
||||||
@TestMetadata("kt12738.kt")
|
@TestMetadata("kt12738.kt")
|
||||||
public void testKt12738() throws Exception {
|
public void testKt12738() throws Exception {
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/bound/kt12738.kt");
|
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/bound/kt12738.kt");
|
||||||
|
|||||||
Reference in New Issue
Block a user