Can be parameter inspection #KT-10819 Fixed

This commit is contained in:
Mikhail Glukhikh
2016-04-06 14:37:53 +03:00
parent 8ace253559
commit 1d83a1a97c
18 changed files with 388 additions and 5 deletions
+1
View File
@@ -0,0 +1 @@
org.jetbrains.kotlin.idea.inspections.CanBeParameterInspection
@@ -0,0 +1,6 @@
// "Remove 'val' from parameter" "true"
open class Base(open <caret>val x: Int) {
val y = x
}
class Derived(y: Int) : Base(y)
@@ -0,0 +1,6 @@
// "Remove 'val' from parameter" "true"
open class Base(x: Int) {
val y = x
}
class Derived(y: Int) : Base(y)
@@ -0,0 +1,4 @@
// "Remove 'var' from parameter" "true"
class UsedInProperty(<caret>var x: Int) {
var y = x
}
@@ -0,0 +1,4 @@
// "Remove 'var' from parameter" "true"
class UsedInProperty(x: Int) {
var y = x
}
@@ -0,0 +1,8 @@
// "Remove 'val' from parameter" "true"
class UsedInProperty(private <caret>val x: Int) {
var y: String
init {
y = x.toString()
}
}
@@ -0,0 +1,8 @@
// "Remove 'val' from parameter" "true"
class UsedInProperty(x: Int) {
var y: String
init {
y = x.toString()
}
}