47 lines
692 B
Plaintext
Vendored
47 lines
692 B
Plaintext
Vendored
// FILE: first.before.kt
|
|
// "Import" "true"
|
|
// ERROR: 'operator' modifier is required on 'set' in 'some.Some'
|
|
// COMPILER_ARGUMENTS: -XXLanguage:-NewInference
|
|
|
|
package testing
|
|
|
|
import some.Some
|
|
|
|
fun foo(): Some = Some()
|
|
|
|
fun testing() {
|
|
foo()<caret>["str"] = 1
|
|
}
|
|
|
|
|
|
|
|
// FILE: second.kt
|
|
package some
|
|
|
|
public class Some {
|
|
fun set(s: String, i: Int) {}
|
|
}
|
|
|
|
operator fun Some.set(s: String, i: Int) {}
|
|
|
|
|
|
|
|
// FILE: first.after.kt
|
|
// "Import" "true"
|
|
// ERROR: 'operator' modifier is required on 'set' in 'some.Some'
|
|
// COMPILER_ARGUMENTS: -XXLanguage:-NewInference
|
|
|
|
package testing
|
|
|
|
import some.Some
|
|
import some.set
|
|
|
|
fun foo(): Some = Some()
|
|
|
|
fun testing() {
|
|
foo()<caret>["str"] = 1
|
|
}
|
|
|
|
|
|
|