Inspections: Explicit "get"

This commit is contained in:
Alexey Sedunov
2014-03-19 16:20:55 +04:00
parent a0bc6a7b39
commit 1bbec14cc0
7 changed files with 87 additions and 0 deletions
@@ -0,0 +1,10 @@
<problems>
<problem>
<file>main.kt</file>
<line>3</line>
<module>light_idea_test_case</module>
<entry_point TYPE="file" FQNAME="temp:///src/src/main.kt" />
<problem_class severity="WARNING" attribute_key="WARNING_ATTRIBUTES">Explicit 'get'</problem_class>
<description>Replace 'get' call with index operator</description>
</problem>
</problems>
@@ -0,0 +1 @@
// INSPECTION_CLASS: org.jetbrains.jet.plugin.inspections.ExplicitGetInspection
@@ -0,0 +1,4 @@
fun foo() {
val a = Array<Int>(10) { it }
println(a.get(5))
}