Revert "Provide quickfix for specifying type of variable initialized with null"
This reverts commit cdf7f46c
This commit is contained in:
@@ -1,7 +0,0 @@
|
||||
// "Change type of 'x' to 'String?'" "true"
|
||||
fun foo(condition: Boolean) {
|
||||
var x = null
|
||||
if (condition) {
|
||||
x = "abc"<caret>
|
||||
}
|
||||
}
|
||||
@@ -1,7 +0,0 @@
|
||||
// "Change type of 'x' to 'String?'" "true"
|
||||
fun foo(condition: Boolean) {
|
||||
var x: String? = null
|
||||
if (condition) {
|
||||
x = "abc"
|
||||
}
|
||||
}
|
||||
@@ -1,12 +0,0 @@
|
||||
// "Change type of 'x' to 'String?'" "false"
|
||||
// ACTION: Remove braces from 'if' statement
|
||||
// ACTION: To raw string literal
|
||||
// ACTION: Convert assignment to assignment expression
|
||||
// ERROR: Type mismatch: inferred type is String but Nothing? was expected
|
||||
// ERROR: Val cannot be reassigned
|
||||
fun foo(condition: Boolean) {
|
||||
val x = null
|
||||
if (condition) {
|
||||
x = "abc"<caret>
|
||||
}
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
// "Change type of 'x' to 'String?'" "false"
|
||||
// ACTION: Remove braces from 'if' statement
|
||||
// ACTION: To raw string literal
|
||||
// ACTION: Convert assignment to assignment expression
|
||||
// ERROR: Type mismatch: inferred type is String but Int? was expected
|
||||
fun foo(condition: Boolean) {
|
||||
var x: Int? = null
|
||||
if (condition) {
|
||||
x = "abc"<caret>
|
||||
}
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
// "Change type of 'x' to 'String?'" "false"
|
||||
// ACTION: Remove braces from 'if' statement
|
||||
// ACTION: To raw string literal
|
||||
// ACTION: Convert assignment to assignment expression
|
||||
// ERROR: Type mismatch: inferred type is String but Int was expected
|
||||
fun foo(condition: Boolean) {
|
||||
var x = 1
|
||||
if (condition) {
|
||||
x = "abc"<caret>
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user