operator toDelegateFor: add front-end test for local delegate property
This commit is contained in:
committed by
Stanislav Erokhin
parent
2ee31916c7
commit
a6bc7271ae
Vendored
+11
@@ -0,0 +1,11 @@
|
||||
// !DIAGNOSTICS: -UNUSED_PARAMETER
|
||||
|
||||
import kotlin.reflect.KProperty
|
||||
|
||||
operator fun String.toDelegateFor(a: Any?, p: KProperty<*>) = this
|
||||
operator fun String.getValue(a: Any?, p: KProperty<*>) = this
|
||||
|
||||
fun test(): String {
|
||||
val result by "OK"
|
||||
return result
|
||||
}
|
||||
Vendored
+5
@@ -0,0 +1,5 @@
|
||||
package
|
||||
|
||||
public fun test(): kotlin.String
|
||||
public operator fun kotlin.String.getValue(/*0*/ a: kotlin.Any?, /*1*/ p: kotlin.reflect.KProperty<*>): kotlin.String
|
||||
public operator fun kotlin.String.toDelegateFor(/*0*/ a: kotlin.Any?, /*1*/ p: kotlin.reflect.KProperty<*>): kotlin.String
|
||||
@@ -5847,6 +5847,12 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTest {
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("localDelegatedProperty.kt")
|
||||
public void testLocalDelegatedProperty() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/delegatedProperty/toDelegateFor/localDelegatedProperty.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("noOperatorModifierOnToDelegateFor.kt")
|
||||
public void testNoOperatorModifierOnToDelegateFor() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/delegatedProperty/toDelegateFor/noOperatorModifierOnToDelegateFor.kt");
|
||||
|
||||
Reference in New Issue
Block a user