Smart completion for generic class instantiation to not insert explicit type arguments (for they'll probably be inferred from the expected type)

This commit is contained in:
Valentin Kipyatkov
2015-09-03 19:35:19 +03:00
parent f470fec840
commit 40de063ebd
12 changed files with 20 additions and 23 deletions
@@ -4,7 +4,7 @@ import java.util.List
fun foo(p: HashMap<String, List<Int>>){}
fun f(){
foo(HashMap<String, List<Int>>())
foo(HashMap(<caret>))
}
// ELEMENT: HashMap
@@ -1,11 +1,10 @@
import java.io.File
import java.util.HashMap
class X<T> {
fun foo(p: java.util.HashMap<java.io.File, T>){}
fun f(){
foo(HashMap<File, T>(<caret>))
foo(HashMap(<caret>))
}
}
@@ -1,12 +1,10 @@
import java.io.File
import java.util.AbstractMap
import java.util.HashMap
class X<T> {
fun foo(p: java.util.HashMap<T, java.util.AbstractMap<T, java.io.File>>){}
fun f(){
foo(HashMap<T, AbstractMap<T, File>>(<caret>))
foo(HashMap(<caret>))
}
}
@@ -5,5 +5,5 @@ trait `trait`
fun foo(p: `class`<`trait`>){}
fun f(){
foo(`class`<`trait`>())<caret>
foo(`class`())<caret>
}