[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,45 @@
// !DIAGNOSTICS: -UNUSED_PARAMETER
object Legal {
operator fun get(i: Int) = 0
operator fun set(i: Int, newValue: Int) {}
operator fun set(i: Int, newValue: String) {}
}
fun testLegal() {
++Legal[0]
Legal[0]++
Legal[0] += 1
}
object MismatchingTypes {
operator fun get(i: Int) = 0
operator fun set(i: Int, newValue: String) {}
}
fun testMismatchingTypes() {
<!INAPPLICABLE_CANDIDATE!>++MismatchingTypes[0]<!>
<!INAPPLICABLE_CANDIDATE!>MismatchingTypes[0]++<!>
MismatchingTypes[0] += 1
}
object MismatchingArities1 {
operator fun get(i: Int) = 0
operator fun set(i: Int, j: Int, newValue: Int) {}
}
object MismatchingArities2 {
operator fun get(i: Int, j: Int) = 0
operator fun set(i: Int, newValue: Int) {}
}
fun testMismatchingArities() {
<!INAPPLICABLE_CANDIDATE!>++MismatchingArities1[0]<!>
<!INAPPLICABLE_CANDIDATE!>MismatchingArities1[0]++<!>
MismatchingArities1[0] += 1
<!UNRESOLVED_REFERENCE!>++<!><!INAPPLICABLE_CANDIDATE!>MismatchingArities2[0]<!>
<!INAPPLICABLE_CANDIDATE!>MismatchingArities2[0]<!><!UNRESOLVED_REFERENCE!>++<!>
MismatchingArities2[0] += 1
}