KT-4914 Smart completion should work after 'as' and 'as?'

#KT-4914 Fixed
This commit is contained in:
Valentin Kipyatkov
2014-07-23 18:34:52 +02:00
parent 32dbed602a
commit 7546a17539
22 changed files with 278 additions and 30 deletions
+11
View File
@@ -0,0 +1,11 @@
fun foo(s: String?){}
fun foo(i: Int){}
fun bar(o: Any) {
foo(o as <caret>)
}
// NUMBER: 2
// EXIST: String
// EXIST: Int
@@ -0,0 +1,11 @@
fun foo(s: List<String>){}
fun foo(i: Map<String, Int>){}
fun bar(o: Any) {
foo(o as <caret>)
}
// NUMBER: 2
// EXIST: { lookupString:"List", itemText:"List<String>" }
// EXIST: { lookupString:"Map", itemText:"Map<String, Int>" }
@@ -0,0 +1,12 @@
fun foo(l: List<String>){}
fun foo(l: List<String>, p: Int){}
fun foo(s: String?){}
fun bar(o: Any) {
foo(o as <caret>)
}
// NUMBER: 2
// EXIST: { lookupString:"List", itemText:"List<String>" }
// EXIST: { lookupString:"String", itemText:"String" }