Create From Usage: Do not generate type for local variables, but add dummy initializer instead

#KT-6705 Fixed
This commit is contained in:
Alexey Sedunov
2015-03-06 14:35:50 +03:00
parent 2987e72d29
commit 8a0808b133
30 changed files with 72 additions and 81 deletions
@@ -1,10 +1,9 @@
// "Create local variable 'foo'" "true"
// ERROR: Variable 'foo' must be initialized
fun test(n: Int): Int {
return when (n) {
1 -> {
val foo: Int
val foo = 0
foo
}
else -> {