Intention for removing explicit type arguments at function calls
This commit is contained in:
@@ -0,0 +1,6 @@
|
||||
// IS_APPLICABLE: true
|
||||
fun foo() {
|
||||
val z = <caret>bar<String, Int, Int, String>("1", 1, 2, "x")
|
||||
}
|
||||
|
||||
fun bar<T, V, R, K>(t: T, v: V, r: R, k: K): Int = 2
|
||||
@@ -0,0 +1,6 @@
|
||||
// IS_APPLICABLE: true
|
||||
fun foo() {
|
||||
val z = bar("1", 1, 2, "x")
|
||||
}
|
||||
|
||||
fun bar<T, V, R, K>(t: T, v: V, r: R, k: K): Int = 2
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
// IS_APPLICABLE: false
|
||||
fun foo() {
|
||||
<caret>bar<(Int) -> Int>({ baz(it) })
|
||||
}
|
||||
|
||||
fun baz(x: Int): Int = x
|
||||
|
||||
fun bar<T>(t: T): Int = 1
|
||||
@@ -0,0 +1,6 @@
|
||||
// IS_APPLICABLE: true
|
||||
fun foo() {
|
||||
<caret>bar<(Int) -> Int> { (it:Int) -> it }
|
||||
}
|
||||
|
||||
fun bar<T>(t: T): Int = 1
|
||||
@@ -0,0 +1,6 @@
|
||||
// IS_APPLICABLE: true
|
||||
fun foo() {
|
||||
bar {(it: Int) -> it }
|
||||
}
|
||||
|
||||
fun bar<T>(t: T): Int = 1
|
||||
@@ -0,0 +1,8 @@
|
||||
// IS_APPLICABLE: true
|
||||
fun foo() {
|
||||
val x = <caret>Box<Any>(Any())
|
||||
}
|
||||
|
||||
class Box<T>(t : T) {
|
||||
var value = t
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
// IS_APPLICABLE: true
|
||||
fun foo() {
|
||||
val x = Box(Any())
|
||||
}
|
||||
|
||||
class Box<T>(t : T) {
|
||||
var value = t
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
// IS_APPLICABLE: true
|
||||
fun foo() {
|
||||
<caret>bar<String>("x")
|
||||
}
|
||||
|
||||
fun bar<T>(t: T): Int = 1
|
||||
@@ -0,0 +1,6 @@
|
||||
// IS_APPLICABLE: true
|
||||
fun foo() {
|
||||
bar("x")
|
||||
}
|
||||
|
||||
fun bar<T>(t: T): Int = 1
|
||||
@@ -0,0 +1,8 @@
|
||||
// IS_APPLICABLE: true
|
||||
fun foo() {
|
||||
val x = <caret>Box<String>("x")
|
||||
}
|
||||
|
||||
class Box<T>(t : T) {
|
||||
var value = t
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
// IS_APPLICABLE: true
|
||||
fun foo() {
|
||||
val x = <caret>Box("x")
|
||||
}
|
||||
|
||||
class Box<T>(t : T) {
|
||||
var value = t
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
// IS_APPLICABLE: true
|
||||
fun foo() {
|
||||
val x = <caret>Box<Box<String>>(Box("x"))
|
||||
}
|
||||
|
||||
class Box<T>(t : T) {
|
||||
var value = t
|
||||
}
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
// IS_APPLICABLE: true
|
||||
fun foo() {
|
||||
val x = Box(Box("x"))
|
||||
}
|
||||
|
||||
class Box<T>(t : T) {
|
||||
var value = t
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
// IS_APPLICABLE: false
|
||||
// ERROR: Unresolved reference: LinkedList
|
||||
fun foo() {
|
||||
val x = <caret>bar<String>()
|
||||
}
|
||||
|
||||
fun <T> bar() : List<T> = LinkedList<T>();
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
// IS_APPLICABLE: false
|
||||
fun foo() {
|
||||
val x = <caret>bar<Any>("x")
|
||||
}
|
||||
|
||||
fun bar<T>(t: T): Int = 1
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
// IS_APPLICABLE: false
|
||||
fun foo() {
|
||||
val x = <caret>Box<Any>("x")
|
||||
}
|
||||
|
||||
class Box<T>(t : T) {
|
||||
var value = t
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
// IS_APPLICABLE: true
|
||||
fun foo() {
|
||||
val x = <caret>bar<String, Int>("x", 0)
|
||||
}
|
||||
|
||||
fun bar<T, V>(t: T, v: V): Int = 1
|
||||
@@ -0,0 +1,6 @@
|
||||
// IS_APPLICABLE: true
|
||||
fun foo() {
|
||||
val x = bar("x", 0)
|
||||
}
|
||||
|
||||
fun bar<T, V>(t: T, v: V): Int = 1
|
||||
@@ -0,0 +1,7 @@
|
||||
// IS_APPLICABLE: true
|
||||
fun foo() {
|
||||
val x = "x"
|
||||
<caret>bar<String>(x)
|
||||
}
|
||||
|
||||
fun bar<T>(t: T): Int = 1
|
||||
@@ -0,0 +1,7 @@
|
||||
// IS_APPLICABLE: true
|
||||
fun foo() {
|
||||
val x = "x"
|
||||
bar(x)
|
||||
}
|
||||
|
||||
fun bar<T>(t: T): Int = 1
|
||||
@@ -0,0 +1,6 @@
|
||||
// IS_APPLICABLE: true
|
||||
fun foo(x: String) {
|
||||
<caret>bar<String>(x)
|
||||
}
|
||||
|
||||
fun bar<T>(t: T): Int = 1
|
||||
@@ -0,0 +1,6 @@
|
||||
// IS_APPLICABLE: true
|
||||
fun foo(x: String) {
|
||||
bar(x)
|
||||
}
|
||||
|
||||
fun bar<T>(t: T): Int = 1
|
||||
@@ -0,0 +1,8 @@
|
||||
// IS_APPLICABLE: true
|
||||
val x = "x"
|
||||
|
||||
fun foo() {
|
||||
<caret>bar<String>(x)
|
||||
}
|
||||
|
||||
fun bar<T>(t: T): Int = 1
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
// IS_APPLICABLE: true
|
||||
val x = "x"
|
||||
|
||||
fun foo() {
|
||||
bar(x)
|
||||
}
|
||||
|
||||
fun bar<T>(t: T): Int = 1
|
||||
@@ -0,0 +1,8 @@
|
||||
// IS_APPLICABLE: true
|
||||
fun foo() {
|
||||
val x = "1"
|
||||
val y = 2
|
||||
val z = <caret>bar<String, Int, Int, String>(x, 1, y, "x")
|
||||
}
|
||||
|
||||
fun bar<T, V, R, K>(t: T, v: V, r: R, k: K): Int = 2
|
||||
@@ -0,0 +1,8 @@
|
||||
// IS_APPLICABLE: true
|
||||
fun foo() {
|
||||
val x = "1"
|
||||
val y = 2
|
||||
val z = bar(x, 1, y, "x")
|
||||
}
|
||||
|
||||
fun bar<T, V, R, K>(t: T, v: V, r: R, k: K): Int = 2
|
||||
Reference in New Issue
Block a user