[FE 1.0] Prohibit using non exhaustive if and when in rhs of elvis expression
^KT-44705 ^KT-49349 Fixed
This commit is contained in:
committed by
teamcityserver
parent
06a26a5a74
commit
a2b8493f47
+1
-1
@@ -1,6 +1,6 @@
|
||||
public fun foo(x: String?, y: String?): Int {
|
||||
while (true) {
|
||||
x ?: if (y == null) break
|
||||
x ?: <!INVALID_IF_AS_EXPRESSION_WARNING!>if<!> (y == null) break
|
||||
// y is nullable if x != null
|
||||
y<!UNSAFE_CALL!>.<!>length
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user