Add quickfix to make referenced primary constructor parameter a property
Fixes #KT-12089
This commit is contained in:
committed by
Dmitry Jemerov
parent
1c5322bae4
commit
f309920af8
@@ -0,0 +1,10 @@
|
||||
// "Make primary constructor parameter 'bar' a property in class 'B'" "true"
|
||||
|
||||
class B(bar: String) {
|
||||
|
||||
inner class A {
|
||||
fun foo() {
|
||||
val a = bar<caret>
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
// "Make primary constructor parameter 'bar' a property in class 'B'" "true"
|
||||
|
||||
class B(val bar: String) {
|
||||
|
||||
inner class A {
|
||||
fun foo() {
|
||||
val a = bar<caret>
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
// "Make primary constructor parameter 'foo' a property" "true"
|
||||
|
||||
class A(foo: String) {
|
||||
fun bar() {
|
||||
val a = foo<caret>
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
// "Make primary constructor parameter 'foo' a property" "true"
|
||||
|
||||
class A(val foo: String) {
|
||||
fun bar() {
|
||||
val a = foo<caret>
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
// "Make primary constructor parameter 'foo' a property" "true"
|
||||
|
||||
class A(foo: String) {
|
||||
fun bar() {
|
||||
foo<caret> = ""
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
// "Make primary constructor parameter 'foo' a property" "true"
|
||||
|
||||
class A(var foo: String) {
|
||||
fun bar() {
|
||||
foo<caret> = ""
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user