[FIR] Implement ASSIGNMENT_TYPE_MISMATCH, RESULT_TYPE_MISMATCH diagnostics, fix tests
This commit is contained in:
committed by
TeamCityServer
parent
aa70c952eb
commit
e57108d4e8
Vendored
+12
-12
@@ -22,10 +22,10 @@ class WrongIncDec() {
|
||||
|
||||
fun testWrongIncDec() {
|
||||
var x = WrongIncDec()
|
||||
x++
|
||||
++x
|
||||
x--
|
||||
--x
|
||||
<error descr="[RESULT_TYPE_MISMATCH] WrongIncDec, kotlin/Int">x++</error>
|
||||
<error descr="[RESULT_TYPE_MISMATCH] WrongIncDec, kotlin/Int">++x</error>
|
||||
<error descr="[RESULT_TYPE_MISMATCH] WrongIncDec, kotlin/Int">x--</error>
|
||||
<error descr="[RESULT_TYPE_MISMATCH] WrongIncDec, kotlin/Int">--x</error>
|
||||
}
|
||||
|
||||
class UnitIncDec() {
|
||||
@@ -35,12 +35,12 @@ class UnitIncDec() {
|
||||
|
||||
fun testUnitIncDec() {
|
||||
var x = UnitIncDec()
|
||||
x++
|
||||
++x
|
||||
x--
|
||||
--x
|
||||
x = x++
|
||||
x = x--
|
||||
x = ++x
|
||||
x = --x
|
||||
<error descr="[RESULT_TYPE_MISMATCH] UnitIncDec, kotlin/Unit">x++</error>
|
||||
<error descr="[RESULT_TYPE_MISMATCH] UnitIncDec, kotlin/Unit">++x</error>
|
||||
<error descr="[RESULT_TYPE_MISMATCH] UnitIncDec, kotlin/Unit">x--</error>
|
||||
<error descr="[RESULT_TYPE_MISMATCH] UnitIncDec, kotlin/Unit">--x</error>
|
||||
x = <error descr="[RESULT_TYPE_MISMATCH] UnitIncDec, kotlin/Unit">x++</error>
|
||||
x = <error descr="[RESULT_TYPE_MISMATCH] UnitIncDec, kotlin/Unit">x--</error>
|
||||
x = <error descr="[RESULT_TYPE_MISMATCH] UnitIncDec, kotlin/Unit">++x</error>
|
||||
x = <error descr="[RESULT_TYPE_MISMATCH] UnitIncDec, kotlin/Unit">--x</error>
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user