Can be parameter inspection: handle usage in super call; again #KT-10819 Fixed
This commit is contained in:
@@ -47,4 +47,12 @@
|
||||
<problem_class severity="WARNING" attribute_key="NOT_USED_ELEMENT_ATTRIBUTES">Constructor parameter is never used as a property</problem_class>
|
||||
<description>Constructor parameter is never used as a property</description>
|
||||
</problem>
|
||||
<problem>
|
||||
<file>test.kt</file>
|
||||
<line>141</line>
|
||||
<module>light_idea_test_case</module>
|
||||
<entry_point TYPE="file" FQNAME="temp:///src/test.kt" />
|
||||
<problem_class severity="WARNING" attribute_key="NOT_USED_ELEMENT_ATTRIBUTES">Constructor parameter is never used as a property</problem_class>
|
||||
<description>Constructor parameter is never used as a property</description>
|
||||
</problem>
|
||||
</problems>
|
||||
+16
-1
@@ -135,4 +135,19 @@ class UsedInLocalFunction(val x: Int) {
|
||||
}
|
||||
local()
|
||||
}
|
||||
}
|
||||
}
|
||||
// YES
|
||||
open class Base1(s: String)
|
||||
class UsedInSuper(val bar123: String) : Base1(bar123)
|
||||
// NO
|
||||
class UsedInLocalSuper(val bar456: String) {
|
||||
fun foo() {
|
||||
class Local : Base1(bar456)
|
||||
}
|
||||
}
|
||||
// NO
|
||||
class UsedInObjectSuper(val bar456: String) {
|
||||
fun foo() {
|
||||
object : Base1(bar456) {}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user