Introduce "Delegate to 'var' property" inspection #KT-26724 Fixed
This commit is contained in:
committed by
Mikhail Glukhikh
parent
17d740a373
commit
0fcd1a2072
@@ -0,0 +1 @@
|
||||
org.jetbrains.kotlin.idea.inspections.DelegationToVarPropertyInspection
|
||||
@@ -0,0 +1,9 @@
|
||||
// PROBLEM: none
|
||||
interface A {
|
||||
fun foo()
|
||||
}
|
||||
class B : A {
|
||||
override fun foo() {
|
||||
}
|
||||
}
|
||||
class C(<caret>b: B) : A by b
|
||||
@@ -0,0 +1,8 @@
|
||||
// PROBLEM: none
|
||||
interface A {
|
||||
fun foo()
|
||||
}
|
||||
class B : A {
|
||||
override fun foo() {}
|
||||
}
|
||||
class C(<caret>val b: B) : A by b
|
||||
@@ -0,0 +1,8 @@
|
||||
// FIX: Change to val
|
||||
interface A {
|
||||
fun foo()
|
||||
}
|
||||
class B : A {
|
||||
override fun foo() {}
|
||||
}
|
||||
class C(<caret>var b: B) : A by b
|
||||
@@ -0,0 +1,8 @@
|
||||
// FIX: Change to val
|
||||
interface A {
|
||||
fun foo()
|
||||
}
|
||||
class B : A {
|
||||
override fun foo() {}
|
||||
}
|
||||
class C(val b: B) : A by b
|
||||
@@ -0,0 +1,8 @@
|
||||
// FIX: Remove var
|
||||
interface A {
|
||||
fun foo()
|
||||
}
|
||||
class B : A {
|
||||
override fun foo() {}
|
||||
}
|
||||
class C(var b: B<caret>) : A by b
|
||||
@@ -0,0 +1,8 @@
|
||||
// FIX: Remove var
|
||||
interface A {
|
||||
fun foo()
|
||||
}
|
||||
class B : A {
|
||||
override fun foo() {}
|
||||
}
|
||||
class C(b: B) : A by b
|
||||
Reference in New Issue
Block a user