Use correct callElement for variable invoke in replacer
Check only 'status.isSuccess' before inlining, no descriptor check Add two tests and fixes two other
This commit is contained in:
+10
@@ -0,0 +1,10 @@
|
||||
class Predicate(val x: Int) {
|
||||
operator fun invoke() = x
|
||||
|
||||
operator fun unaryMinus() = Predicate(-x)
|
||||
}
|
||||
|
||||
fun test(p: Predicate) {
|
||||
val x = -p
|
||||
println(<caret>x())
|
||||
}
|
||||
Vendored
+9
@@ -0,0 +1,9 @@
|
||||
class Predicate(val x: Int) {
|
||||
operator fun invoke() = x
|
||||
|
||||
operator fun unaryMinus() = Predicate(-x)
|
||||
}
|
||||
|
||||
fun test(p: Predicate) {
|
||||
println((-p)())
|
||||
}
|
||||
Vendored
+10
@@ -0,0 +1,10 @@
|
||||
class Predicate(val x: Int) {
|
||||
operator fun set(i: Int, j: Int) {}
|
||||
|
||||
operator fun unaryMinus() = Predicate(-x)
|
||||
}
|
||||
|
||||
fun test(p: Predicate) {
|
||||
val x = -p
|
||||
<caret>x[13] = 42
|
||||
}
|
||||
Vendored
+9
@@ -0,0 +1,9 @@
|
||||
class Predicate(val x: Int) {
|
||||
operator fun set(i: Int, j: Int) {}
|
||||
|
||||
operator fun unaryMinus() = Predicate(-x)
|
||||
}
|
||||
|
||||
fun test(p: Predicate) {
|
||||
(-p)[13] = 42
|
||||
}
|
||||
Reference in New Issue
Block a user