KT-5482 Redundant type arguments are not detected in some cases

#KT-5482 Fixed
This commit is contained in:
Valentin Kipyatkov
2015-06-03 21:28:47 +03:00
parent 9802931a90
commit f14615315d
7 changed files with 44 additions and 5 deletions
@@ -124,4 +124,13 @@
<problem_class severity="WARNING" attribute_key="WARNING_ATTRIBUTES">Type arguments are unnecessary</problem_class>
<description>Remove explicit type arguments</description>
</problem>
<problem>
<file>mapGet.kt</file>
<line>9</line>
<module>light_idea_test_case</module>
<entry_point TYPE="file" FQNAME="temp:///src/mapGet.kt" />
<problem_class severity="WARNING" attribute_key="NOT_USED_ELEMENT_ATTRIBUTES">Type arguments are unnecessary</problem_class>
<description>Remove explicit type arguments</description>
</problem>
</problems>
@@ -0,0 +1,11 @@
interface I<T>
interface MyMap {
fun <T : Any> get(`type`: I<T>): T?
}
class A(val map: MyMap) {
fun <T> foo(`type`: I<T>) {
val value = map.get<caret><T>(`type`)
}
}
@@ -0,0 +1,11 @@
interface I<T>
interface MyMap {
fun <T : Any> get(`type`: I<T>): T?
}
class A(val map: MyMap) {
fun <T> foo(`type`: I<T>) {
val value = map.get<caret>(`type`)
}
}