FIR: Fix false positive INAPPLICABLE_INFIX_MODIFIER

This commit is contained in:
Denis Zharkov
2020-04-20 15:29:14 +03:00
parent 27b860682b
commit fa3b3e7a9a
16 changed files with 65 additions and 42 deletions
@@ -10,4 +10,15 @@ infix class A
infix typealias B = A
infix val x = 1
infix val x = 1
class C {
infix fun good(x: Int) {}
infix fun Int.goodAsWell(x: Int) {}
<!INAPPLICABLE_INFIX_MODIFIER!>infix fun Int.foo(x: Int, y: Int) {}<!>
<!INAPPLICABLE_INFIX_MODIFIER!>infix fun Int.bar() {}<!>
<!INAPPLICABLE_INFIX_MODIFIER!>infix fun baz(x: Int, y: Int) {}<!>
}
@@ -16,3 +16,24 @@ FILE: infixFunctions.kt
public final typealias B = R|A|
public final val x: R|kotlin/Int| = Int(1)
public get(): R|kotlin/Int|
public final class C : R|kotlin/Any| {
public constructor(): R|C| {
super<R|kotlin/Any|>()
}
public final infix fun good(x: R|kotlin/Int|): R|kotlin/Unit| {
}
public final infix fun R|kotlin/Int|.goodAsWell(x: R|kotlin/Int|): R|kotlin/Unit| {
}
public final infix fun R|kotlin/Int|.foo(x: R|kotlin/Int|, y: R|kotlin/Int|): R|kotlin/Unit| {
}
public final infix fun R|kotlin/Int|.bar(): R|kotlin/Unit| {
}
public final infix fun baz(x: R|kotlin/Int|, y: R|kotlin/Int|): R|kotlin/Unit| {
}
}
@@ -1,7 +1,7 @@
interface List<out T : Any> {
operator fun get(index: Int): T
<!INAPPLICABLE_INFIX_MODIFIER!>infix fun concat(other: List<T>): List<T><!>
infix fun concat(other: List<T>): List<T>
}
typealias StringList = List<out String>