diff --git a/idea/idea-completion/testData/basic/java/PropertyMetadata.kt b/idea/idea-completion/testData/basic/java/KProperty.kt similarity index 52% rename from idea/idea-completion/testData/basic/java/PropertyMetadata.kt rename to idea/idea-completion/testData/basic/java/KProperty.kt index d26413d435a..13222f01188 100644 --- a/idea/idea-completion/testData/basic/java/PropertyMetadata.kt +++ b/idea/idea-completion/testData/basic/java/KProperty.kt @@ -2,8 +2,8 @@ package first fun firstFun() { - val a = PropertyM + val a = KProp } // INVOCATION_COUNT: 1 -// EXIST: { lookupString:"PropertyMetadata", itemText:"PropertyMetadata", tailText:" (kotlin)" } +// EXIST: { lookupString:"KProperty", itemText:"KProperty", tailText:" (kotlin.reflect)" } diff --git a/idea/idea-completion/tests/org/jetbrains/kotlin/idea/completion/test/JvmBasicCompletionTestGenerated.java b/idea/idea-completion/tests/org/jetbrains/kotlin/idea/completion/test/JvmBasicCompletionTestGenerated.java index 9d8c21a0282..12304f16907 100644 --- a/idea/idea-completion/tests/org/jetbrains/kotlin/idea/completion/test/JvmBasicCompletionTestGenerated.java +++ b/idea/idea-completion/tests/org/jetbrains/kotlin/idea/completion/test/JvmBasicCompletionTestGenerated.java @@ -2272,6 +2272,12 @@ public class JvmBasicCompletionTestGenerated extends AbstractJvmBasicCompletionT doTest(fileName); } + @TestMetadata("KProperty.kt") + public void testKProperty() throws Exception { + String fileName = JetTestUtils.navigationMetadata("idea/idea-completion/testData/basic/java/KProperty.kt"); + doTest(fileName); + } + @TestMetadata("NoDuplicationForImportedJavaClass.kt") public void testNoDuplicationForImportedJavaClass() throws Exception { String fileName = JetTestUtils.navigationMetadata("idea/idea-completion/testData/basic/java/NoDuplicationForImportedJavaClass.kt"); @@ -2296,12 +2302,6 @@ public class JvmBasicCompletionTestGenerated extends AbstractJvmBasicCompletionT doTest(fileName); } - @TestMetadata("PropertyMetadata.kt") - public void testPropertyMetadata() throws Exception { - String fileName = JetTestUtils.navigationMetadata("idea/idea-completion/testData/basic/java/PropertyMetadata.kt"); - doTest(fileName); - } - @TestMetadata("SAMAdaptersStatic.kt") public void testSAMAdaptersStatic() throws Exception { String fileName = JetTestUtils.navigationMetadata("idea/idea-completion/testData/basic/java/SAMAdaptersStatic.kt"); diff --git a/idea/testData/checker/infos/CapturedConstructorParameter.kt b/idea/testData/checker/infos/CapturedConstructorParameter.kt index 48adc111ba5..3c4154a450d 100644 --- a/idea/testData/checker/infos/CapturedConstructorParameter.kt +++ b/idea/testData/checker/infos/CapturedConstructorParameter.kt @@ -1,3 +1,5 @@ +import kotlin.reflect.KProperty + interface T class T1(t: Int): T @@ -5,7 +7,7 @@ class T1(t: Int): T class Delegate(d: Int) { - operator fun getValue(k: Any, m: PropertyMetadata) {} + operator fun getValue(k: Any, m: KProperty<*>) {} } class A(y: Int, t: Int, d: Int): T by T1(t) { diff --git a/idea/testData/copyPaste/imports/DelegatedProperty.kt b/idea/testData/copyPaste/imports/DelegatedProperty.kt index f611d855f6d..65e35c9fff8 100644 --- a/idea/testData/copyPaste/imports/DelegatedProperty.kt +++ b/idea/testData/copyPaste/imports/DelegatedProperty.kt @@ -1,17 +1,19 @@ // NO_ERRORS_DUMP package a +import kotlin.reflect.KProperty + interface T -fun T.getValue(thisRef: B, desc: PropertyMetadata): Int { +fun T.getValue(thisRef: B, desc: KProperty<*>): Int { return 3 } -fun T.setValue(thisRef: B, desc: PropertyMetadata, value: Int) { +fun T.setValue(thisRef: B, desc: KProperty<*>, value: Int) { } class A(): T class B { var v by A() -} \ No newline at end of file +} diff --git a/idea/testData/debugger/smartStepInto/delegatedPropertyGetter.kt b/idea/testData/debugger/smartStepInto/delegatedPropertyGetter.kt index 5c569e4a3ff..e0cce7bb5d3 100644 --- a/idea/testData/debugger/smartStepInto/delegatedPropertyGetter.kt +++ b/idea/testData/debugger/smartStepInto/delegatedPropertyGetter.kt @@ -1,3 +1,5 @@ +import kotlin.reflect.KProperty + fun foo() { a } @@ -5,7 +7,7 @@ fun foo() { val a by Delegate() class Delegate { - fun getValue(t: Any?, p: PropertyMetadata) = 1 + fun getValue(t: Any?, p: KProperty<*>) = 1 } -// EXISTS: a.getValue(Any?\, PropertyMetadata) \ No newline at end of file +// EXISTS: a.getValue(Any?\, KProperty<*>) diff --git a/idea/testData/debugger/tinyApp/outs/delegatedPropertyInClass.out b/idea/testData/debugger/tinyApp/outs/delegatedPropertyInClass.out index 93861361eef..7c67ceddc52 100644 --- a/idea/testData/debugger/tinyApp/outs/delegatedPropertyInClass.out +++ b/idea/testData/debugger/tinyApp/outs/delegatedPropertyInClass.out @@ -1,10 +1,11 @@ -LineBreakpoint created at delegatedPropertyInClass.kt:8 +LineBreakpoint created at delegatedPropertyInClass.kt:9 !JDK_HOME!\bin\java -agentlib:jdwp=transport=dt_socket,address=!HOST_NAME!:!HOST_PORT!,suspend=y,server=n -Dfile.encoding=!FILE_ENCODING! -classpath !OUTPUT_PATH!;!KOTLIN_RUNTIME!;!CUSTOM_LIBRARY!;!RT_JAR! delegatedPropertyInClass.DelegatedPropertyInClassPackage Connected to the target VM, address: '!HOST_NAME!:PORT_NAME!', transport: 'socket' -delegatedPropertyInClass.kt:8 +delegatedPropertyInClass.kt:9 package delegatedPropertyInClass import kotlin.properties.Delegates +import kotlin.reflect.KProperty fun main(args: Array) { val a = A() @@ -18,23 +19,24 @@ class A { } class MyDelegate { - fun getValue(t: Any?, p: PropertyMetadata): Int = 1 + fun getValue(t: Any?, p: KProperty<*>): Int = 1 } class MyDelegateThrowsException { - fun getValue(t: Any?, p: PropertyMetadata): Int = throw IllegalStateException() + fun getValue(t: Any?, p: KProperty<*>): Int = throw IllegalStateException() } // PRINT_FRAME - frame = main():8, DelegatedPropertyInClassKt {delegatedPropertyInClass} - local = args: java.lang.String[] = {java.lang.String[0]@uniqueID} (sp = delegatedPropertyInClass.kt, 5) - local = a: delegatedPropertyInClass.A = {delegatedPropertyInClass.A@uniqueID} (sp = delegatedPropertyInClass.kt, 6) - field = prop$delegate: delegatedPropertyInClass.MyDelegate = {delegatedPropertyInClass.MyDelegate@uniqueID} (sp = delegatedPropertyInClass.kt, 12) + + frame = main():9, DelegatedPropertyInClassKt {delegatedPropertyInClass} + local = args: java.lang.String[] = {java.lang.String[0]@uniqueID} (sp = delegatedPropertyInClass.kt, 6) + local = a: delegatedPropertyInClass.A = {delegatedPropertyInClass.A@uniqueID} (sp = delegatedPropertyInClass.kt, 7) + field = prop$delegate: delegatedPropertyInClass.MyDelegate = {delegatedPropertyInClass.MyDelegate@uniqueID} (sp = delegatedPropertyInClass.kt, 13) - Class has no fields - field = prop: int = 1 (sp = delegatedPropertyInClass.kt, 12) - field = propEx$delegate: delegatedPropertyInClass.MyDelegateThrowsException = {delegatedPropertyInClass.MyDelegateThrowsException@uniqueID} (sp = delegatedPropertyInClass.kt, 13) + field = prop: int = 1 (sp = delegatedPropertyInClass.kt, 13) + field = propEx$delegate: delegatedPropertyInClass.MyDelegateThrowsException = {delegatedPropertyInClass.MyDelegateThrowsException@uniqueID} (sp = delegatedPropertyInClass.kt, 14) - Class has no fields - field = propEx: int = {java.lang.IllegalStateException@uniqueID}java.lang.IllegalStateException (sp = delegatedPropertyInClass.kt, 13) + field = propEx: int = {java.lang.IllegalStateException@uniqueID}java.lang.IllegalStateException (sp = delegatedPropertyInClass.kt, 14) field = detailMessage: java.lang.String = null (sp = Throwable.!EXT!) field = cause: java.lang.Throwable = {java.lang.IllegalStateException@uniqueID}java.lang.IllegalStateException (sp = Throwable.!EXT!) field = stackTrace: java.lang.StackTraceElement[] = null (sp = Throwable.!EXT!) diff --git a/idea/testData/debugger/tinyApp/outs/delegatedPropertyInClassWoRenderer.out b/idea/testData/debugger/tinyApp/outs/delegatedPropertyInClassWoRenderer.out index f5dcea9bca3..35895399cfc 100644 --- a/idea/testData/debugger/tinyApp/outs/delegatedPropertyInClassWoRenderer.out +++ b/idea/testData/debugger/tinyApp/outs/delegatedPropertyInClassWoRenderer.out @@ -1,10 +1,11 @@ -LineBreakpoint created at delegatedPropertyInClassWoRenderer.kt:8 +LineBreakpoint created at delegatedPropertyInClassWoRenderer.kt:9 !JDK_HOME!\bin\java -agentlib:jdwp=transport=dt_socket,address=!HOST_NAME!:!HOST_PORT!,suspend=y,server=n -Dfile.encoding=!FILE_ENCODING! -classpath !OUTPUT_PATH!;!KOTLIN_RUNTIME!;!CUSTOM_LIBRARY!;!RT_JAR! delegatedPropertyInClassWoRenderer.DelegatedPropertyInClassWoRendererPackage Connected to the target VM, address: '!HOST_NAME!:PORT_NAME!', transport: 'socket' -delegatedPropertyInClassWoRenderer.kt:8 +delegatedPropertyInClassWoRenderer.kt:9 package delegatedPropertyInClassWoRenderer import kotlin.properties.Delegates +import kotlin.reflect.KProperty fun main(args: Array) { val a = A() @@ -17,15 +18,16 @@ class A { } class MyDelegate { - fun getValue(t: Any?, p: PropertyMetadata): Int = 1 + fun getValue(t: Any?, p: KProperty<*>): Int = 1 } // RENDER_DELEGATED_PROPERTIES: false // PRINT_FRAME - frame = main():8, DelegatedPropertyInClassWoRendererKt {delegatedPropertyInClassWoRenderer} - local = args: java.lang.String[] = {java.lang.String[0]@uniqueID} (sp = delegatedPropertyInClassWoRenderer.kt, 5) - local = a: delegatedPropertyInClassWoRenderer.A = {delegatedPropertyInClassWoRenderer.A@uniqueID} (sp = delegatedPropertyInClassWoRenderer.kt, 6) - field = prop: int = {delegatedPropertyInClassWoRenderer.MyDelegate@uniqueID} (sp = delegatedPropertyInClassWoRenderer.kt, 12) + + frame = main():9, DelegatedPropertyInClassWoRendererKt {delegatedPropertyInClassWoRenderer} + local = args: java.lang.String[] = {java.lang.String[0]@uniqueID} (sp = delegatedPropertyInClassWoRenderer.kt, 6) + local = a: delegatedPropertyInClassWoRenderer.A = {delegatedPropertyInClassWoRenderer.A@uniqueID} (sp = delegatedPropertyInClassWoRenderer.kt, 7) + field = prop: int = {delegatedPropertyInClassWoRenderer.MyDelegate@uniqueID} (sp = delegatedPropertyInClassWoRenderer.kt, 13) - Class has no fields Disconnected from the target VM, address: '!HOST_NAME!:PORT_NAME!', transport: 'socket' diff --git a/idea/testData/debugger/tinyApp/outs/dependentOnFile.out b/idea/testData/debugger/tinyApp/outs/dependentOnFile.out index 73531fd595c..59f5cb480bc 100644 --- a/idea/testData/debugger/tinyApp/outs/dependentOnFile.out +++ b/idea/testData/debugger/tinyApp/outs/dependentOnFile.out @@ -1,7 +1,7 @@ -LineBreakpoint created at dependentOnFile.kt:5 +LineBreakpoint created at dependentOnFile.kt:7 !JDK_HOME!\bin\java -agentlib:jdwp=transport=dt_socket,address=!HOST_NAME!:!HOST_PORT!,suspend=y,server=n -Dfile.encoding=!FILE_ENCODING! -classpath !OUTPUT_PATH!;!KOTLIN_RUNTIME!;!CUSTOM_LIBRARY!;!RT_JAR! dependentOnFile.DependentOnFilePackage Connected to the target VM, address: '!HOST_NAME!:PORT_NAME!', transport: 'socket' -dependentOnFile.kt:5 +dependentOnFile.kt:7 Compile bytecode for TestClass().testFun() Compile bytecode for testFun() Compile bytecode for TestObject.p diff --git a/idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/dependentOnFile.kt b/idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/dependentOnFile.kt index 8a7f16bf5c7..6135f2bbb64 100644 --- a/idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/dependentOnFile.kt +++ b/idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/dependentOnFile.kt @@ -1,5 +1,7 @@ package dependentOnFile +import kotlin.reflect.KProperty + fun main(args: Array) { //Breakpoint! args.size() @@ -25,7 +27,7 @@ val Int.testExtVal: Int get() = 1 val testDelVal by Delegate() class Delegate { - fun getValue(a: Any?, b: PropertyMetadata) = 1 + fun getValue(a: Any?, b: KProperty<*>) = 1 } // EXPRESSION: TestClass().testFun() diff --git a/idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/frame/delegatedPropertyInClass.kt b/idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/frame/delegatedPropertyInClass.kt index 2392f75de7f..b2a9bdfeb52 100644 --- a/idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/frame/delegatedPropertyInClass.kt +++ b/idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/frame/delegatedPropertyInClass.kt @@ -1,6 +1,7 @@ package delegatedPropertyInClass import kotlin.properties.Delegates +import kotlin.reflect.KProperty fun main(args: Array) { val a = A() @@ -14,11 +15,11 @@ class A { } class MyDelegate { - fun getValue(t: Any?, p: PropertyMetadata): Int = 1 + fun getValue(t: Any?, p: KProperty<*>): Int = 1 } class MyDelegateThrowsException { - fun getValue(t: Any?, p: PropertyMetadata): Int = throw IllegalStateException() + fun getValue(t: Any?, p: KProperty<*>): Int = throw IllegalStateException() } -// PRINT_FRAME \ No newline at end of file +// PRINT_FRAME diff --git a/idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/frame/delegatedPropertyInClassWoRenderer.kt b/idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/frame/delegatedPropertyInClassWoRenderer.kt index f3c463425b8..5be6497a9b8 100644 --- a/idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/frame/delegatedPropertyInClassWoRenderer.kt +++ b/idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/frame/delegatedPropertyInClassWoRenderer.kt @@ -1,6 +1,7 @@ package delegatedPropertyInClassWoRenderer import kotlin.properties.Delegates +import kotlin.reflect.KProperty fun main(args: Array) { val a = A() @@ -13,8 +14,8 @@ class A { } class MyDelegate { - fun getValue(t: Any?, p: PropertyMetadata): Int = 1 + fun getValue(t: Any?, p: KProperty<*>): Int = 1 } // RENDER_DELEGATED_PROPERTIES: false -// PRINT_FRAME \ No newline at end of file +// PRINT_FRAME diff --git a/idea/testData/findUsages/kotlin/conventions/getAsPropertyDelegate.0.kt b/idea/testData/findUsages/kotlin/conventions/getAsPropertyDelegate.0.kt index 3cb2de1e66b..8547f26295b 100644 --- a/idea/testData/findUsages/kotlin/conventions/getAsPropertyDelegate.0.kt +++ b/idea/testData/findUsages/kotlin/conventions/getAsPropertyDelegate.0.kt @@ -1,8 +1,10 @@ // PSI_ELEMENT: org.jetbrains.kotlin.psi.JetNamedFunction // OPTIONS: usages +import kotlin.reflect.KProperty + class Delegate() { - fun getValue(thisRef: Any?, propertyMetadata: PropertyMetadata): String = ":)" + fun getValue(thisRef: Any?, property: KProperty<*>): String = ":)" } val p: String by Delegate() diff --git a/idea/testData/findUsages/kotlin/conventions/getAsPropertyDelegate.results.txt b/idea/testData/findUsages/kotlin/conventions/getAsPropertyDelegate.results.txt index f23b746a113..1abd0f48279 100644 --- a/idea/testData/findUsages/kotlin/conventions/getAsPropertyDelegate.results.txt +++ b/idea/testData/findUsages/kotlin/conventions/getAsPropertyDelegate.results.txt @@ -1 +1 @@ -Property delegation (8: 15) val p: String by Delegate() \ No newline at end of file +Property delegation (10: 15) val p: String by Delegate() \ No newline at end of file diff --git a/idea/testData/findUsages/kotlin/conventions/propertyDelegatedFunction.0.kt b/idea/testData/findUsages/kotlin/conventions/propertyDelegatedFunction.0.kt index cc2342c8719..55fd9f3c7bc 100644 --- a/idea/testData/findUsages/kotlin/conventions/propertyDelegatedFunction.0.kt +++ b/idea/testData/findUsages/kotlin/conventions/propertyDelegatedFunction.0.kt @@ -1,12 +1,14 @@ // PSI_ELEMENT: org.jetbrains.kotlin.psi.JetNamedFunction // OPTIONS: usages +import kotlin.reflect.KProperty + class Delegate() { - fun getValue(thisRef: Any?, propertyMetadata: PropertyMetadata): String = ":)" - fun setValue(thisRef: Any?, propertyMetadata: PropertyMetadata, value: String) { + fun getValue(thisRef: Any?, property: KProperty<*>): String = ":)" + fun setValue(thisRef: Any?, property: KProperty<*>, value: String) { } - fun propertyDelegated(propertyMetadata: PropertyMetadata) { + fun propertyDelegated(property: KProperty<*>) { } } diff --git a/idea/testData/findUsages/kotlin/conventions/propertyDelegatedFunction.results.txt b/idea/testData/findUsages/kotlin/conventions/propertyDelegatedFunction.results.txt index 1b87cdc3c47..51dd8b64207 100644 --- a/idea/testData/findUsages/kotlin/conventions/propertyDelegatedFunction.results.txt +++ b/idea/testData/findUsages/kotlin/conventions/propertyDelegatedFunction.results.txt @@ -1 +1 @@ -Property delegation (13: 15) var p: String by Delegate() \ No newline at end of file +Property delegation (15: 15) var p: String by Delegate() \ No newline at end of file diff --git a/idea/testData/findUsages/kotlin/conventions/setAsPropertyDelegate.0.kt b/idea/testData/findUsages/kotlin/conventions/setAsPropertyDelegate.0.kt index eb15ea19806..ac0544d3c44 100644 --- a/idea/testData/findUsages/kotlin/conventions/setAsPropertyDelegate.0.kt +++ b/idea/testData/findUsages/kotlin/conventions/setAsPropertyDelegate.0.kt @@ -1,9 +1,11 @@ // PSI_ELEMENT: org.jetbrains.kotlin.psi.JetNamedFunction // OPTIONS: usages +import kotlin.reflect.KProperty + class Delegate() { - fun getValue(thisRef: Any?, propertyMetadata: PropertyMetadata): String = ":)" - fun setValue(thisRef: Any?, propertyMetadata: PropertyMetadata, value: String) { + fun getValue(thisRef: Any?, property: KProperty<*>): String = ":)" + fun setValue(thisRef: Any?, property: KProperty<*>, value: String) { } } diff --git a/idea/testData/findUsages/kotlin/conventions/setAsPropertyDelegate.results.txt b/idea/testData/findUsages/kotlin/conventions/setAsPropertyDelegate.results.txt index 287d4b8d562..1b87cdc3c47 100644 --- a/idea/testData/findUsages/kotlin/conventions/setAsPropertyDelegate.results.txt +++ b/idea/testData/findUsages/kotlin/conventions/setAsPropertyDelegate.results.txt @@ -1 +1 @@ -Property delegation (11: 15) var p: String by Delegate() \ No newline at end of file +Property delegation (13: 15) var p: String by Delegate() \ No newline at end of file diff --git a/idea/testData/inspections/cleanup/cleanup.kt.after b/idea/testData/inspections/cleanup/cleanup.kt.after index 6693f79f2c4..34846fc6ab0 100644 --- a/idea/testData/inspections/cleanup/cleanup.kt.after +++ b/idea/testData/inspections/cleanup/cleanup.kt.after @@ -1,5 +1,6 @@ import pack.bar import pack.oldFun2 // should not be removed for non-deprecated overload used +import kotlin.reflect.KProperty class A private constructor() @@ -45,8 +46,8 @@ class Foo { } class CustomDelegate { - operator fun getValue(thisRef: Any?, prop: PropertyMetadata): String = "" - operator fun setValue(thisRef: Any?, prop: PropertyMetadata, value: String) {} + operator fun getValue(thisRef: Any?, prop: KProperty<*>): String = "" + operator fun setValue(thisRef: Any?, prop: KProperty<*>, value: String) {} } class B { diff --git a/idea/testData/inspections/unusedReceiverParameter/delegatedProperty.kt b/idea/testData/inspections/unusedReceiverParameter/delegatedProperty.kt index 5382407818e..3118fbeaf4b 100644 --- a/idea/testData/inspections/unusedReceiverParameter/delegatedProperty.kt +++ b/idea/testData/inspections/unusedReceiverParameter/delegatedProperty.kt @@ -1,5 +1,7 @@ +import kotlin.reflect.KProperty + class MyProperty { - fun getValue(thisRef: Any?, desc: PropertyMetadata) = ":)" + fun getValue(thisRef: Any?, desc: KProperty<*>) = ":)" } val Any.ext by MyProperty() diff --git a/idea/testData/resolve/referenceWithLib/delegatedPropertyWithTypeParameters.kt b/idea/testData/resolve/referenceWithLib/delegatedPropertyWithTypeParameters.kt index 60b5ebc1859..611bed9d9c8 100644 --- a/idea/testData/resolve/referenceWithLib/delegatedPropertyWithTypeParameters.kt +++ b/idea/testData/resolve/referenceWithLib/delegatedPropertyWithTypeParameters.kt @@ -9,5 +9,5 @@ class B { } // MULTIRESOLVE -// REF: (for T in dependency).getValue(R,kotlin.PropertyMetadata) -// REF: (for T in dependency).setValue(R,kotlin.PropertyMetadata,kotlin.Int) +// REF: (for T in dependency).getValue(R,kotlin.reflect.KProperty<*>) +// REF: (for T in dependency).setValue(R,kotlin.reflect.KProperty<*>,kotlin.Int) diff --git a/idea/testData/resolve/referenceWithLib/delegatedPropertyWithTypeParametersSrc/delegatedPropertyWithTypeParametersDependency.kt b/idea/testData/resolve/referenceWithLib/delegatedPropertyWithTypeParametersSrc/delegatedPropertyWithTypeParametersDependency.kt index 53a5a26a493..c7e136f78ee 100644 --- a/idea/testData/resolve/referenceWithLib/delegatedPropertyWithTypeParametersSrc/delegatedPropertyWithTypeParametersDependency.kt +++ b/idea/testData/resolve/referenceWithLib/delegatedPropertyWithTypeParametersSrc/delegatedPropertyWithTypeParametersDependency.kt @@ -1,8 +1,10 @@ package dependency -public fun T.getValue(thisRef: R, desc: PropertyMetadata): Int { +import kotlin.reflect.KProperty + +public fun T.getValue(thisRef: R, desc: KProperty<*>): Int { return 3 } -public fun T.setValue(thisRef: R, desc: PropertyMetadata, value: Int) { +public fun T.setValue(thisRef: R, desc: KProperty<*>, value: Int) { } diff --git a/jps-plugin/testData/incremental/lookupTracker/conventions/delegateProperty.kt b/jps-plugin/testData/incremental/lookupTracker/conventions/delegateProperty.kt index b6595d9bbbb..5fa5b67c2da 100644 --- a/jps-plugin/testData/incremental/lookupTracker/conventions/delegateProperty.kt +++ b/jps-plugin/testData/incremental/lookupTracker/conventions/delegateProperty.kt @@ -1,16 +1,18 @@ package foo.bar +import kotlin.reflect.KProperty + /*p:foo.bar*/class D1 { - fun get(t: /*c:foo.bar.D1 p:foo.bar*/Any?, p: /*c:foo.bar.D1 p:foo.bar*/PropertyMetadata) = 1 + fun get(t: /*c:foo.bar.D1 p:foo.bar*/Any?, p: /*c:foo.bar.D1*/KProperty<*>) = 1 } -/*p:foo.bar*/fun /*p:foo.bar*/D1.set(t: /*p:foo.bar*/Any?, p: /*p:foo.bar*/PropertyMetadata, v: /*p:foo.bar*/Int) {} +/*p:foo.bar*/fun /*p:foo.bar*/D1.set(t: /*p:foo.bar*/Any?, p: KProperty<*>, v: /*p:foo.bar*/Int) {} /*p:foo.bar(D2)*/open class D2 { - fun set(t: /*c:foo.bar.D2 p:foo.bar*/Any?, p: /*c:foo.bar.D2 p:foo.bar*/PropertyMetadata, v: /*c:foo.bar.D2 p:foo.bar*/Int) {} + fun set(t: /*c:foo.bar.D2 p:foo.bar*/Any?, p: /*c:foo.bar.D2*/KProperty<*>, v: /*c:foo.bar.D2 p:foo.bar*/Int) {} } -/*p:foo.bar*/fun /*p:foo.bar*/D2.get(t: /*p:foo.bar*/Any?, p: /*p:foo.bar*/PropertyMetadata) = 1 +/*p:foo.bar*/fun /*p:foo.bar*/D2.get(t: /*p:foo.bar*/Any?, p: KProperty<*>) = 1 /*p:foo.bar*/fun /*p:foo.bar*/D2.propertyDelegated(p: /*p:foo.bar*/Any?) {} /*p:foo.bar*/class D3 : /*p:foo.bar*/D2() { diff --git a/jps-plugin/testData/incremental/pureKotlin/delegatedPropertyInlineExtensionAccessor/build.log b/jps-plugin/testData/incremental/pureKotlin/delegatedPropertyInlineExtensionAccessor/build.log index c2f6c6d4d8f..d4162fbf6f8 100644 --- a/jps-plugin/testData/incremental/pureKotlin/delegatedPropertyInlineExtensionAccessor/build.log +++ b/jps-plugin/testData/incremental/pureKotlin/delegatedPropertyInlineExtensionAccessor/build.log @@ -7,7 +7,9 @@ Compiling files: src/inlineGet.kt End of files Cleaning output files: +out/production/module/usage/UsageVal$x$1.class out/production/module/usage/UsageVal.class +out/production/module/usage/UsageVar$x$1.class out/production/module/usage/UsageVar.class End of files Compiling files: @@ -25,6 +27,7 @@ Compiling files: src/inlineSet.kt End of files Cleaning output files: +out/production/module/usage/UsageVar$x$1.class out/production/module/usage/UsageVar.class End of files Compiling files: diff --git a/jps-plugin/testData/incremental/pureKotlin/delegatedPropertyInlineExtensionAccessor/inlineGet.kt b/jps-plugin/testData/incremental/pureKotlin/delegatedPropertyInlineExtensionAccessor/inlineGet.kt index 1277c339dca..a5ca9157e97 100644 --- a/jps-plugin/testData/incremental/pureKotlin/delegatedPropertyInlineExtensionAccessor/inlineGet.kt +++ b/jps-plugin/testData/incremental/pureKotlin/delegatedPropertyInlineExtensionAccessor/inlineGet.kt @@ -1,5 +1,7 @@ package inline -inline fun Inline.getValue(receiver: Any?, prop: PropertyMetadata): Int { +import kotlin.reflect.KProperty + +inline fun Inline.getValue(receiver: Any?, prop: KProperty<*>): Int { return 0 -} \ No newline at end of file +} diff --git a/jps-plugin/testData/incremental/pureKotlin/delegatedPropertyInlineExtensionAccessor/inlineGet.kt.new.1 b/jps-plugin/testData/incremental/pureKotlin/delegatedPropertyInlineExtensionAccessor/inlineGet.kt.new.1 index 3ed00a5f3b1..c1e548cf52c 100644 --- a/jps-plugin/testData/incremental/pureKotlin/delegatedPropertyInlineExtensionAccessor/inlineGet.kt.new.1 +++ b/jps-plugin/testData/incremental/pureKotlin/delegatedPropertyInlineExtensionAccessor/inlineGet.kt.new.1 @@ -1,5 +1,7 @@ package inline -inline fun Inline.getValue(receiver: Any?, prop: PropertyMetadata): Int { +import kotlin.reflect.KProperty + +inline fun Inline.getValue(receiver: Any?, prop: KProperty<*>): Int { return 1 -} \ No newline at end of file +} diff --git a/jps-plugin/testData/incremental/pureKotlin/delegatedPropertyInlineExtensionAccessor/inlineSet.kt b/jps-plugin/testData/incremental/pureKotlin/delegatedPropertyInlineExtensionAccessor/inlineSet.kt index 0a9a76e7be4..36754dd7b0e 100644 --- a/jps-plugin/testData/incremental/pureKotlin/delegatedPropertyInlineExtensionAccessor/inlineSet.kt +++ b/jps-plugin/testData/incremental/pureKotlin/delegatedPropertyInlineExtensionAccessor/inlineSet.kt @@ -1,5 +1,7 @@ package inline -inline fun Inline.setValue(receiver: Any?, prop: PropertyMetadata, value: Int) { +import kotlin.reflect.KProperty + +inline fun Inline.setValue(receiver: Any?, prop: KProperty<*>, value: Int) { println(value) -} \ No newline at end of file +} diff --git a/jps-plugin/testData/incremental/pureKotlin/delegatedPropertyInlineExtensionAccessor/inlineSet.kt.new.2 b/jps-plugin/testData/incremental/pureKotlin/delegatedPropertyInlineExtensionAccessor/inlineSet.kt.new.2 index 446a5ad574c..bec3dc03047 100644 --- a/jps-plugin/testData/incremental/pureKotlin/delegatedPropertyInlineExtensionAccessor/inlineSet.kt.new.2 +++ b/jps-plugin/testData/incremental/pureKotlin/delegatedPropertyInlineExtensionAccessor/inlineSet.kt.new.2 @@ -1,5 +1,7 @@ package inline -inline fun Inline.setValue(receiver: Any?, prop: PropertyMetadata, value: Int) { +import kotlin.reflect.KProperty + +inline fun Inline.setValue(receiver: Any?, prop: KProperty<*>, value: Int) { println(value * 2) -} \ No newline at end of file +} diff --git a/jps-plugin/testData/incremental/pureKotlin/delegatedPropertyInlineMethodAccessor/build.log b/jps-plugin/testData/incremental/pureKotlin/delegatedPropertyInlineMethodAccessor/build.log index eafebdfd179..b85fde4388d 100644 --- a/jps-plugin/testData/incremental/pureKotlin/delegatedPropertyInlineMethodAccessor/build.log +++ b/jps-plugin/testData/incremental/pureKotlin/delegatedPropertyInlineMethodAccessor/build.log @@ -5,7 +5,9 @@ Compiling files: src/inline.kt End of files Cleaning output files: +out/production/module/usage/UsageVal$x$1.class out/production/module/usage/UsageVal.class +out/production/module/usage/UsageVar$x$1.class out/production/module/usage/UsageVar.class End of files Compiling files: @@ -21,6 +23,7 @@ Compiling files: src/inline.kt End of files Cleaning output files: +out/production/module/usage/UsageVar$x$1.class out/production/module/usage/UsageVar.class End of files Compiling files: diff --git a/jps-plugin/testData/incremental/pureKotlin/delegatedPropertyInlineMethodAccessor/inline.kt b/jps-plugin/testData/incremental/pureKotlin/delegatedPropertyInlineMethodAccessor/inline.kt index 470f1f47d05..059a1a9379d 100644 --- a/jps-plugin/testData/incremental/pureKotlin/delegatedPropertyInlineMethodAccessor/inline.kt +++ b/jps-plugin/testData/incremental/pureKotlin/delegatedPropertyInlineMethodAccessor/inline.kt @@ -1,11 +1,13 @@ package inline +import kotlin.reflect.KProperty + class Inline { - inline fun getValue(receiver: Any?, prop: PropertyMetadata): Int { + inline fun getValue(receiver: Any?, prop: KProperty<*>): Int { return 0 } - inline fun setValue(receiver: Any?, prop: PropertyMetadata, value: Int) { + inline fun setValue(receiver: Any?, prop: KProperty<*>, value: Int) { println(value) } -} \ No newline at end of file +} diff --git a/jps-plugin/testData/incremental/pureKotlin/delegatedPropertyInlineMethodAccessor/inline.kt.new.1 b/jps-plugin/testData/incremental/pureKotlin/delegatedPropertyInlineMethodAccessor/inline.kt.new.1 index 49af798d65d..b983f8237cb 100644 --- a/jps-plugin/testData/incremental/pureKotlin/delegatedPropertyInlineMethodAccessor/inline.kt.new.1 +++ b/jps-plugin/testData/incremental/pureKotlin/delegatedPropertyInlineMethodAccessor/inline.kt.new.1 @@ -1,11 +1,13 @@ package inline +import kotlin.reflect.KProperty + class Inline { - inline fun getValue(receiver: Any?, prop: PropertyMetadata): Int { + inline fun getValue(receiver: Any?, prop: KProperty<*>): Int { return 1 } - inline fun setValue(receiver: Any?, prop: PropertyMetadata, value: Int) { + inline fun setValue(receiver: Any?, prop: KProperty<*>, value: Int) { println(value) } -} \ No newline at end of file +} diff --git a/jps-plugin/testData/incremental/pureKotlin/delegatedPropertyInlineMethodAccessor/inline.kt.new.2 b/jps-plugin/testData/incremental/pureKotlin/delegatedPropertyInlineMethodAccessor/inline.kt.new.2 index d0a03b3014f..f65f3c2cf62 100644 --- a/jps-plugin/testData/incremental/pureKotlin/delegatedPropertyInlineMethodAccessor/inline.kt.new.2 +++ b/jps-plugin/testData/incremental/pureKotlin/delegatedPropertyInlineMethodAccessor/inline.kt.new.2 @@ -1,11 +1,13 @@ package inline +import kotlin.reflect.KProperty + class Inline { - inline fun getValue(receiver: Any?, prop: PropertyMetadata): Int { + inline fun getValue(receiver: Any?, prop: KProperty<*>): Int { return 1 } - inline fun setValue(receiver: Any?, prop: PropertyMetadata, value: Int) { + inline fun setValue(receiver: Any?, prop: KProperty<*>, value: Int) { println(value * 2) } -} \ No newline at end of file +}