[FIR] Add INAPPLICABLE_OPERATOR_MODIFIER diagnostic

This commit is contained in:
Andrey Zinovyev
2021-08-16 14:59:20 +03:00
committed by TeamCityServer
parent 16f41bd80c
commit 1cd321a90f
37 changed files with 388 additions and 238 deletions
@@ -1,10 +0,0 @@
class IncDec {
operator fun inc(): Unit {}
}
fun foo(): IncDec {
var x = IncDec()
x = x<!INC_DEC_SHOULD_NOT_RETURN_UNIT!>++<!>
x<!INC_DEC_SHOULD_NOT_RETURN_UNIT!>++<!>
return x
}
@@ -1,3 +1,4 @@
// FIR_IDENTICAL
class IncDec {
<!INAPPLICABLE_OPERATOR_MODIFIER!>operator<!> fun inc(): Unit {}
}