Fix incremental compilation for delegated property with inline accessor
This commit is contained in:
@@ -60,7 +60,7 @@ public class DescriptorFactory {
|
||||
PropertySetterDescriptorImpl setterDescriptor =
|
||||
new PropertySetterDescriptorImpl(propertyDescriptor, annotations, propertyDescriptor.getModality(),
|
||||
propertyDescriptor.getVisibility(), !isDefault, isDefault,
|
||||
CallableMemberDescriptor.Kind.DECLARATION, null, SourceElement.NO_SOURCE);
|
||||
CallableMemberDescriptor.Kind.DECLARATION, null, propertyDescriptor.getSource());
|
||||
setterDescriptor.initializeDefault();
|
||||
return setterDescriptor;
|
||||
}
|
||||
@@ -80,7 +80,7 @@ public class DescriptorFactory {
|
||||
boolean isDefault) {
|
||||
return new PropertyGetterDescriptorImpl(propertyDescriptor, annotations, propertyDescriptor.getModality(),
|
||||
propertyDescriptor.getVisibility(), !isDefault, isDefault,
|
||||
CallableMemberDescriptor.Kind.DECLARATION, null, SourceElement.NO_SOURCE);
|
||||
CallableMemberDescriptor.Kind.DECLARATION, null, propertyDescriptor.getSource());
|
||||
}
|
||||
|
||||
@NotNull
|
||||
|
||||
@@ -239,6 +239,18 @@ public class IncrementalJpsTestGenerated extends AbstractIncrementalJpsTest {
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("delegatedPropertyInlineExtensionAccessor")
|
||||
public void testDelegatedPropertyInlineExtensionAccessor() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/delegatedPropertyInlineExtensionAccessor/");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("delegatedPropertyInlineMethodAccessor")
|
||||
public void testDelegatedPropertyInlineMethodAccessor() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/delegatedPropertyInlineMethodAccessor/");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("dependencyClassReferenced")
|
||||
public void testDependencyClassReferenced() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/dependencyClassReferenced/");
|
||||
|
||||
Vendored
+7
@@ -0,0 +1,7 @@
|
||||
package usage
|
||||
|
||||
import inline.*
|
||||
|
||||
class UsageVal {
|
||||
val x: Int by Inline()
|
||||
}
|
||||
Vendored
+7
@@ -0,0 +1,7 @@
|
||||
package usage
|
||||
|
||||
import inline.*
|
||||
|
||||
class UsageVar {
|
||||
var x: Int by Inline()
|
||||
}
|
||||
Vendored
+32
@@ -0,0 +1,32 @@
|
||||
Cleaning output files:
|
||||
out/production/module/META-INF/module.kotlin_module
|
||||
out/production/module/inline/InlineGetKt.class
|
||||
out/production/module/inline/InlinePackage.class
|
||||
End of files
|
||||
Compiling files:
|
||||
src/inlineGet.kt
|
||||
End of files
|
||||
Cleaning output files:
|
||||
out/production/module/usage/UsageVal.class
|
||||
out/production/module/usage/UsageVar.class
|
||||
End of files
|
||||
Compiling files:
|
||||
src/UsageVal.kt
|
||||
src/UsageVar.kt
|
||||
End of files
|
||||
|
||||
|
||||
Cleaning output files:
|
||||
out/production/module/META-INF/module.kotlin_module
|
||||
out/production/module/inline/InlinePackage.class
|
||||
out/production/module/inline/InlineSetKt.class
|
||||
End of files
|
||||
Compiling files:
|
||||
src/inlineSet.kt
|
||||
End of files
|
||||
Cleaning output files:
|
||||
out/production/module/usage/UsageVar.class
|
||||
End of files
|
||||
Compiling files:
|
||||
src/UsageVar.kt
|
||||
End of files
|
||||
Vendored
+3
@@ -0,0 +1,3 @@
|
||||
package inline
|
||||
|
||||
class Inline
|
||||
Vendored
+5
@@ -0,0 +1,5 @@
|
||||
package inline
|
||||
|
||||
inline fun Inline.get(receiver: Any?, prop: PropertyMetadata): Int {
|
||||
return 0
|
||||
}
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
package inline
|
||||
|
||||
inline fun Inline.get(receiver: Any?, prop: PropertyMetadata): Int {
|
||||
return 1
|
||||
}
|
||||
Vendored
+5
@@ -0,0 +1,5 @@
|
||||
package inline
|
||||
|
||||
inline fun Inline.set(receiver: Any?, prop: PropertyMetadata, value: Int) {
|
||||
println(value)
|
||||
}
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
package inline
|
||||
|
||||
inline fun Inline.set(receiver: Any?, prop: PropertyMetadata, value: Int) {
|
||||
println(value * 2)
|
||||
}
|
||||
Vendored
+3
@@ -0,0 +1,3 @@
|
||||
package usage
|
||||
|
||||
fun other() {}
|
||||
Vendored
+7
@@ -0,0 +1,7 @@
|
||||
package usage
|
||||
|
||||
import inline.Inline
|
||||
|
||||
class UsageVal {
|
||||
val x: Int by Inline()
|
||||
}
|
||||
Vendored
+7
@@ -0,0 +1,7 @@
|
||||
package usage
|
||||
|
||||
import inline.Inline
|
||||
|
||||
class UsageVar {
|
||||
var x: Int by Inline()
|
||||
}
|
||||
+28
@@ -0,0 +1,28 @@
|
||||
Cleaning output files:
|
||||
out/production/module/inline/Inline.class
|
||||
End of files
|
||||
Compiling files:
|
||||
src/inline.kt
|
||||
End of files
|
||||
Cleaning output files:
|
||||
out/production/module/usage/UsageVal.class
|
||||
out/production/module/usage/UsageVar.class
|
||||
End of files
|
||||
Compiling files:
|
||||
src/UsageVal.kt
|
||||
src/UsageVar.kt
|
||||
End of files
|
||||
|
||||
|
||||
Cleaning output files:
|
||||
out/production/module/inline/Inline.class
|
||||
End of files
|
||||
Compiling files:
|
||||
src/inline.kt
|
||||
End of files
|
||||
Cleaning output files:
|
||||
out/production/module/usage/UsageVar.class
|
||||
End of files
|
||||
Compiling files:
|
||||
src/UsageVar.kt
|
||||
End of files
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
package inline
|
||||
|
||||
class Inline {
|
||||
inline fun get(receiver: Any?, prop: PropertyMetadata): Int {
|
||||
return 0
|
||||
}
|
||||
|
||||
inline fun set(receiver: Any?, prop: PropertyMetadata, value: Int) {
|
||||
println(value)
|
||||
}
|
||||
}
|
||||
Vendored
+11
@@ -0,0 +1,11 @@
|
||||
package inline
|
||||
|
||||
class Inline {
|
||||
inline fun get(receiver: Any?, prop: PropertyMetadata): Int {
|
||||
return 1
|
||||
}
|
||||
|
||||
inline fun set(receiver: Any?, prop: PropertyMetadata, value: Int) {
|
||||
println(value)
|
||||
}
|
||||
}
|
||||
Vendored
+11
@@ -0,0 +1,11 @@
|
||||
package inline
|
||||
|
||||
class Inline {
|
||||
inline fun get(receiver: Any?, prop: PropertyMetadata): Int {
|
||||
return 1
|
||||
}
|
||||
|
||||
inline fun set(receiver: Any?, prop: PropertyMetadata, value: Int) {
|
||||
println(value * 2)
|
||||
}
|
||||
}
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
package usage
|
||||
|
||||
fun other() {}
|
||||
Reference in New Issue
Block a user