KT-11481 "Add import" intention is not available for 'is' branches in when

#KT-11481 Fixed
This commit is contained in:
Valentin Kipyatkov
2016-03-23 14:28:28 +03:00
parent f93bf9fbb4
commit 02d309c9cf
6 changed files with 92 additions and 11 deletions
+15
View File
@@ -0,0 +1,15 @@
// INTENTION_TEXT: "Add import for 'ppp.Foo.Bar'"
// WITH_RUNTIME
package ppp
sealed class Foo {
class Bar(val x: Int) : Foo()
}
fun test() {
val foo = Foo.Bar(5)
when (foo) {
is Foo.<caret>Bar -> println(foo.x)
}
}