Highlighting unused type parameter.
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
<problems>
|
||||
<problem>
|
||||
<file>unusedFunctionTypeParameter.kt</file>
|
||||
<line>1</line>
|
||||
<module>light_idea_test_case</module>
|
||||
<entry_point TYPE="file" FQNAME="temp:///src/unusedFunctionTypeParameter.kt" />
|
||||
<problem_class severity="WARNING" attribute_key="NOT_USED_ELEMENT_ATTRIBUTES">Unused Symbol</problem_class>
|
||||
<description>Type parameter 'T' is never used</description>
|
||||
</problem>
|
||||
|
||||
<problem>
|
||||
<file>unusedClassTypeParameter.kt</file>
|
||||
<line>1</line>
|
||||
<module>light_idea_test_case</module>
|
||||
<entry_point TYPE="file" FQNAME="temp:///src/unusedClassTypeParameter.kt" />
|
||||
<problem_class severity="WARNING" attribute_key="NOT_USED_ELEMENT_ATTRIBUTES">Unused Symbol</problem_class>
|
||||
<description>Type parameter 'T' is never used</description>
|
||||
</problem>
|
||||
</problems>
|
||||
@@ -0,0 +1 @@
|
||||
// INSPECTION_CLASS: org.jetbrains.kotlin.idea.inspections.UnusedSymbolInspection
|
||||
@@ -0,0 +1,9 @@
|
||||
class UnusedClassTypeParameter<T>(p: String) {
|
||||
{
|
||||
println(p)
|
||||
}
|
||||
}
|
||||
|
||||
fun main(args: Array<String>) {
|
||||
UnusedClassTypeParameter("")
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
fun <T> unusedFunctionTypeParameter(p: String) {
|
||||
}
|
||||
|
||||
fun main(args: Array<String>) {
|
||||
unusedFunctionTypeParameter("")
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
class UsedClassTypeParameter<T>(t: T) {
|
||||
{
|
||||
println(t)
|
||||
}
|
||||
}
|
||||
|
||||
fun main(args: Array<String>) {
|
||||
UsedClassTypeParameter("")
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
fun <T> usedFunctionTypeParameter(t: T) {
|
||||
}
|
||||
|
||||
fun main(args: Array<String>) {
|
||||
usedFunctionTypeParameter("")
|
||||
}
|
||||
Reference in New Issue
Block a user