[FIR IDE] Fix resolving sugared compound operators (like +=, -=)
^KTIJ-21374 Fixed
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
// UNRESOLVED_REFERENCE
|
||||
package test
|
||||
|
||||
interface Foo
|
||||
|
||||
interface WithOperator {
|
||||
operator fun plus(f: Foo): WithOperator
|
||||
}
|
||||
|
||||
fun test(withOperator: WithOperator, foo: Foo) {
|
||||
var variable = withOperator
|
||||
variable <caret>= variable + foo
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
package test
|
||||
|
||||
interface Foo
|
||||
|
||||
interface WithOperator {
|
||||
operator fun plusAssign(f: Foo)
|
||||
}
|
||||
|
||||
fun test(withOperator: WithOperator, foo: Foo) {
|
||||
withOperator <caret>+= foo
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
Resolved to:
|
||||
0: (in test.WithOperator) operator fun plusAssign(f: test.Foo)
|
||||
@@ -0,0 +1,12 @@
|
||||
package test
|
||||
|
||||
interface Foo
|
||||
|
||||
interface WithOperator {
|
||||
operator fun plus(f: Foo): WithOperator
|
||||
}
|
||||
|
||||
fun test(withOperator: WithOperator, foo: Foo) {
|
||||
var variable = withOperator
|
||||
variable <caret>+= foo
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
Resolved to:
|
||||
0: (in test.WithOperator) operator fun plus(f: test.Foo): test.WithOperator
|
||||
Reference in New Issue
Block a user