KT-5028 "remove explicit type arguments" intention shouldn't be applicable
#KT-5028 Fixed
This commit is contained in:
+7
@@ -0,0 +1,7 @@
|
||||
// IS_APPLICABLE: true
|
||||
|
||||
fun bar(): Foo<Int> = foo<caret><Int>()
|
||||
|
||||
class Foo<T>
|
||||
|
||||
fun <T> foo(): Foo<T> = Foo()
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
// IS_APPLICABLE: true
|
||||
|
||||
fun bar(): Foo<Int> = foo<caret>()
|
||||
|
||||
class Foo<T>
|
||||
|
||||
fun <T> foo(): Foo<T> = Foo()
|
||||
@@ -98,4 +98,30 @@
|
||||
<description>Remove explicit type arguments</description>
|
||||
</problem>
|
||||
|
||||
<problem>
|
||||
<file>returnCallWithUnnecessaryTypeArgs.kt</file>
|
||||
<line>4</line>
|
||||
<module>light_idea_test_case</module>
|
||||
<entry_point TYPE="file" FQNAME="temp:///src/returnCallWithUnnecessaryTypeArgs.kt" />
|
||||
<problem_class severity="WARNING" attribute_key="WARNING_ATTRIBUTES">Type arguments are unnecessary</problem_class>
|
||||
<description>Remove explicit type arguments</description>
|
||||
</problem>
|
||||
|
||||
<problem>
|
||||
<file>propertyInitializerIsCallWithUnnecessaryTypeArgs.kt</file>
|
||||
<line>4</line>
|
||||
<module>light_idea_test_case</module>
|
||||
<entry_point TYPE="file" FQNAME="temp:///src/propertyInitializerIsCallWithUnnecessaryTypeArgs.kt" />
|
||||
<problem_class severity="WARNING" attribute_key="WARNING_ATTRIBUTES">Type arguments are unnecessary</problem_class>
|
||||
<description>Remove explicit type arguments</description>
|
||||
</problem>
|
||||
|
||||
<problem>
|
||||
<file>functionBodyIsCallWithUnnecessaryTypeArgs.kt</file>
|
||||
<line>3</line>
|
||||
<module>light_idea_test_case</module>
|
||||
<entry_point TYPE="file" FQNAME="temp:///src/functionBodyIsCallWithUnnecessaryTypeArgs.kt" />
|
||||
<problem_class severity="WARNING" attribute_key="WARNING_ATTRIBUTES">Type arguments are unnecessary</problem_class>
|
||||
<description>Remove explicit type arguments</description>
|
||||
</problem>
|
||||
</problems>
|
||||
@@ -0,0 +1,8 @@
|
||||
// IS_APPLICABLE: false
|
||||
|
||||
class Some<T>
|
||||
fun <T> foo(c: Some<T>) {}
|
||||
|
||||
fun test() {
|
||||
foo(Some<caret><String>())
|
||||
}
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
// IS_APPLICABLE: true
|
||||
|
||||
fun bar() {
|
||||
val l: Foo<Int> = foo<caret><Int>()
|
||||
}
|
||||
|
||||
class Foo<T>
|
||||
|
||||
fun <T> foo(): Foo<T> = Foo()
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
// IS_APPLICABLE: true
|
||||
|
||||
fun bar() {
|
||||
val l: Foo<Int> = foo<caret>()
|
||||
}
|
||||
|
||||
class Foo<T>
|
||||
|
||||
fun <T> foo(): Foo<T> = Foo()
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
// IS_APPLICABLE: true
|
||||
|
||||
fun bar(): Foo<Int> {
|
||||
return foo<caret><Int>()
|
||||
}
|
||||
|
||||
class Foo<T>
|
||||
|
||||
fun <T> foo(): Foo<T> = Foo()
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
// IS_APPLICABLE: true
|
||||
|
||||
fun bar(): Foo<Int> {
|
||||
return foo<caret>()
|
||||
}
|
||||
|
||||
class Foo<T>
|
||||
|
||||
fun <T> foo(): Foo<T> = Foo()
|
||||
Reference in New Issue
Block a user