[FIR] propagate copy of original ConeKotlinType to anonymous functions to avoid concurrent modification
It is required to avoid leakage of annotations instance from the original type It should be enough to just create a new instance of an annotation without a deep copy, because transformer shouldn't touch it ^KT-60387 Fixed
This commit is contained in:
committed by
Space Team
parent
51b9059123
commit
d0854d5b45
+22
@@ -0,0 +1,22 @@
|
||||
// FIR_IDENTICAL
|
||||
// FILE: usage.kt
|
||||
val propertyToResolve: String
|
||||
get() = JavaClass.function()?.let { " ($it)" } ?: ""
|
||||
|
||||
// FILE: Anno.java
|
||||
import java.lang.annotation.ElementType;
|
||||
import java.lang.annotation.Target;
|
||||
|
||||
@Target(ElementType.TYPE_USE)
|
||||
public @interface Anno {
|
||||
String value();
|
||||
}
|
||||
|
||||
// FILE: JavaClass.java
|
||||
import java.util.List;
|
||||
|
||||
public class JavaClass {
|
||||
public static @Anno("outer") List<@Anno("middle") List<@Anno("inner") Integer>> function() {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user