[FIR-TEST] Add new testdata generated after changes in previous commit

This commit is contained in:
Dmitriy Novozhilov
2019-12-11 16:16:22 +03:00
parent e9c02a1cca
commit 2536fa0cd5
4578 changed files with 104067 additions and 1 deletions
@@ -0,0 +1,39 @@
// !DIAGNOSTICS: -UNUSED_PARAMETER
class Example
fun Example.plus(other: Example) = 0
operator infix fun Example.minus(other: Example) = 0
operator infix fun Example.times(other: Example) = 0
fun Example.div(other: Example) = 0
fun a() {
with (Example()) {
operator infix fun Example.plus(other: Example) = ""
fun Example.minus(other: Example) = ""
operator infix fun Example.times(other: Example) = ""
fun Example.div(other: Example) = ""
with (Example()) {
val a = Example()
val b = Example()
consumeString(a + b)
<!INAPPLICABLE_CANDIDATE!>consumeInt<!>(a - b)
consumeString(a plus b)
<!INAPPLICABLE_CANDIDATE!>consumeInt<!>(a minus b)
a * b
a / b
a times b
a div b
}
}
}
fun consumeInt(i: Int) {}
fun consumeString(s: String) {}
@@ -0,0 +1,45 @@
// !DIAGNOSTICS: -UNUSED_PARAMETER, -EXTENSION_SHADOWED_BY_MEMBER
class Example {
<!INAPPLICABLE_INFIX_MODIFIER!>operator infix fun plus(other: Example) = 0<!>
fun minus(other: Example) = 0
<!INAPPLICABLE_INFIX_MODIFIER!>operator infix fun times(other: Example) = 0<!>
fun div(other: Example) = 0
}
fun Example.plus(other: Example) = ""
operator infix fun Example.minus(other: Example) = ""
operator infix fun Example.times(other: Example) = ""
fun Example.div(other: Example) = ""
fun a() {
val a = Example()
val b = Example()
a + b
a - b
a * b
a / b
a plus b
a minus b
a times b
a div b
with (Example()) {
consumeInt(this + a)
<!INAPPLICABLE_CANDIDATE!>consumeString<!>(this - b)
consumeInt(this * a)
consumeInt(this / b)
consumeInt(this plus a)
<!INAPPLICABLE_CANDIDATE!>consumeString<!>(this minus b)
consumeInt(this times a)
consumeInt(this div b)
}
}
fun consumeInt(i: Int) {}
fun consumeString(s: String) {}
@@ -0,0 +1,45 @@
// !DIAGNOSTICS: -UNUSED_PARAMETER, -EXTENSION_SHADOWED_BY_MEMBER
open class Example {
fun invoke() = 0
fun get(i: Int) = 0
fun component1() = 0
fun component2() = 0
fun inc() = Example()
fun plus(o: Example) = 0
}
class Example2 : Example()
operator fun Example.invoke() = ""
operator fun Example.get(i: Int) = ""
operator fun Example.component1() = ""
operator fun Example.component2() = ""
operator fun Example.inc() = Example2()
infix fun Example.plus(o: Example) = ""
fun test() {
var a = Example()
val b = Example()
<!INAPPLICABLE_CANDIDATE!>consumeString<!>(a())
<!INAPPLICABLE_CANDIDATE!>consumeString<!>(a[1])
val (x, y) = Example()
<!INAPPLICABLE_CANDIDATE!>consumeString<!>(x)
<!INAPPLICABLE_CANDIDATE!>consumeString<!>(y)
<!INAPPLICABLE_CANDIDATE!>consumeExample2<!>(++a)
<!INAPPLICABLE_CANDIDATE!>consumeString<!>(a plus b)
}
fun consumeInt(i: Int) {}
fun consumeString(s: String) {}
fun consumeExample2(e: Example2) {}