Revert "Provide quickfix for specifying type of variable initialized with null"

This reverts commit cdf7f46c
This commit is contained in:
Yan Zhulanow
2020-10-24 00:20:18 +09:00
parent 4327bc4ac3
commit b18de1e3ff
8 changed files with 0 additions and 86 deletions
@@ -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>
}
}