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:
+1
-1
@@ -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
-2
@@ -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
-3
@@ -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>))
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -5,5 +5,5 @@ trait `trait`
|
||||
fun foo(p: `class`<`trait`>){}
|
||||
|
||||
fun f(){
|
||||
foo(`class`<`trait`>())<caret>
|
||||
foo(`class`())<caret>
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user