Fix 'add not-null asserted call' quick fix for operation in
#KT-18529 Fixed
This commit is contained in:
+1
-1
@@ -2,7 +2,7 @@
|
||||
// IS_APPLICABLE: false
|
||||
// ERROR: Type mismatch: inferred type is Int but Boolean was expected
|
||||
// ERROR: Type mismatch: inferred type is Int but Boolean was expected
|
||||
// ERROR: Infix call corresponds to a dot-qualified call 'foo.times(10)' which is not allowed on a nullable receiver 'foo'. Use '?.'-qualified call instead
|
||||
// ERROR: Operator call corresponds to a dot-qualified call 'foo.times(10)' which is not allowed on a nullable receiver 'foo'.
|
||||
|
||||
fun String?.times(a: Int): Boolean = a == 0
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
// IS_APPLICABLE: false
|
||||
// ERROR: Type mismatch: inferred type is Int but Boolean was expected
|
||||
// ERROR: Type mismatch: inferred type is Int but Boolean was expected
|
||||
// ERROR: Infix call corresponds to a dot-qualified call 'foo.times(10)' which is not allowed on a nullable receiver 'foo'. Use '?.'-qualified call instead
|
||||
// ERROR: Operator call corresponds to a dot-qualified call 'foo.times(10)' which is not allowed on a nullable receiver 'foo'.
|
||||
|
||||
fun main(args: Array<String>) {
|
||||
val foo: Int? = 4
|
||||
|
||||
Vendored
+1
-1
@@ -1,5 +1,5 @@
|
||||
// IS_APPLICABLE: false
|
||||
// ERROR: Infix call corresponds to a dot-qualified call 'nullable?.compareTo(1).compareTo(0)' which is not allowed on a nullable receiver 'nullable?.compareTo(1)'. Use '?.'-qualified call instead
|
||||
// ERROR: Operator call corresponds to a dot-qualified call 'nullable?.compareTo(1).compareTo(0)' which is not allowed on a nullable receiver 'nullable?.compareTo(1)'.
|
||||
|
||||
val nullable: Int? = null
|
||||
val x = nullable?.compareTo<caret>(1) >= 0
|
||||
Reference in New Issue
Block a user