Additional codegen test for KT-10107
This commit is contained in:
+13
@@ -0,0 +1,13 @@
|
||||
// See KT-10107: 'Variable must be initialized' for delegate with private set
|
||||
|
||||
class My {
|
||||
var delegate: String by kotlin.properties.Delegates.notNull()
|
||||
private set
|
||||
|
||||
init {
|
||||
delegate = "OK"
|
||||
}
|
||||
}
|
||||
|
||||
fun box() = My().delegate
|
||||
|
||||
+6
@@ -1468,6 +1468,12 @@ public class BlackBoxWithStdlibCodegenTestGenerated extends AbstractBlackBoxCode
|
||||
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxWithStdlib/delegatedProperty"), Pattern.compile("^(.+)\\.kt$"), true);
|
||||
}
|
||||
|
||||
@TestMetadata("delegateWithPrivateSet.kt")
|
||||
public void testDelegateWithPrivateSet() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxWithStdlib/delegatedProperty/delegateWithPrivateSet.kt");
|
||||
doTestWithStdlib(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("kt6722.kt")
|
||||
public void testKt6722() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxWithStdlib/delegatedProperty/kt6722.kt");
|
||||
|
||||
Reference in New Issue
Block a user