Add quickfix to make referenced primary constructor parameter a property

Fixes #KT-12089
This commit is contained in:
Kirill Rakhman
2016-04-28 00:28:04 +02:00
committed by Dmitry Jemerov
parent 1c5322bae4
commit f309920af8
10 changed files with 153 additions and 5 deletions
@@ -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> = ""
}
}