Create from Usage: Fix "Create class" applicability check for when entries

#KT-22329 Fixed
This commit is contained in:
Alexey Sedunov
2018-02-08 20:43:07 +03:00
parent 0934859718
commit acf6408474
5 changed files with 63 additions and 13 deletions
@@ -0,0 +1,15 @@
// "Create class 'AAA'" "true"
// ERROR: Unresolved reference: BBB
abstract class I
fun test(n: Int): I? {
return if (n > 0) {
when (n) {
1 -> <caret>AAA("1")
2 -> BBB("2")
else -> null
}
}
else null
}