Create from Usage: Show receiver type in the text of "Create extension" quick fix

(cherry picked from commit c0d5df1)
This commit is contained in:
Alexey Sedunov
2016-06-29 19:22:53 +03:00
parent 79f73d3cc2
commit 1a13c21377
97 changed files with 116 additions and 99 deletions
@@ -1,6 +1,6 @@
// "Create abstract property 'foo'" "false"
// ACTION: Convert to expression body
// ACTION: Create extension property 'foo'
// ACTION: Create extension property 'B.foo'
// ACTION: Create member property 'foo'
// ACTION: Create property 'foo' as constructor parameter
// ACTION: Rename reference
@@ -1,5 +1,5 @@
// "Create property 'foo'" "false"
// ACTION: Create extension function 'bar'
// ACTION: Create extension function 'A<Int>.bar'
// ACTION: Create member function 'bar'
// ACTION: Rename reference
// ERROR: Unresolved reference: bar
@@ -1,4 +1,4 @@
// "Create extension property 'foo'" "true"
// "Create extension property 'A.foo'" "true"
// ERROR: Unresolved reference: foo
import package1.A
@@ -1,4 +1,4 @@
// "Create extension property 'foo'" "true"
// "Create extension property 'A.foo'" "true"
// ERROR: Unresolved reference: foo
import package1.A
@@ -1,4 +1,4 @@
// "Create extension property 'foo'" "true"
// "Create extension property 'A.foo'" "true"
// ERROR: Unresolved reference: foo
val A.foo: String?
@@ -1,4 +1,4 @@
// "Create extension property 'foo'" "true"
// "Create extension property 'A.foo'" "true"
// ERROR: Unresolved reference: foo
fun test(): String? {
@@ -1,4 +1,4 @@
// "Create extension property 'foo'" "true"
// "Create extension property 'A.foo'" "true"
// ERROR: Unresolved reference: foo
val A.foo: String?
@@ -1,4 +1,4 @@
// "Create extension property 'foo'" "true"
// "Create extension property 'A.foo'" "true"
// ERROR: Unresolved reference: foo
fun test(): String? {
@@ -1,4 +1,4 @@
// "Create extension property 'bar'" "true"
// "Create extension property 'T.bar'" "true"
// ERROR: Property must be initialized
fun consume(n: Int) {}
@@ -1,4 +1,4 @@
// "Create extension property 'bar'" "true"
// "Create extension property 'T.bar'" "true"
// ERROR: Property must be initialized
fun consume(n: Int) {}
@@ -1,6 +1,6 @@
// "Create property 'foo'" "false"
// ERROR: Unresolved reference: foo
// ACTION: Create extension function 'foo'
// ACTION: Create extension function 'Int.foo'
// ACTION: Replace infix call with ordinary call
// WITH_RUNTIME
fun refer() {
@@ -1,5 +1,5 @@
// "Create member property 'bar'" "false"
// ACTION: Create extension property 'bar'
// ACTION: Create extension property 'T.bar'
// ACTION: Rename reference
// ACTION: Convert to expression body
// ERROR: Unresolved reference: bar
@@ -1,6 +1,6 @@
// "Create property 'foo'" "false"
// ACTION: Convert to expression body
// ACTION: Create extension property 'foo'
// ACTION: Create extension property 'A.foo'
// ACTION: Rename reference
// ERROR: Unresolved reference: foo
@@ -1,6 +1,6 @@
// "Create property 'foo'" "false"
// ACTION: Convert to expression body
// ACTION: Create extension property 'foo'
// ACTION: Create extension property 'A.foo'
// ACTION: Rename reference
// ERROR: Unresolved reference: foo
@@ -1,4 +1,4 @@
// "Create extension property 'foo'" "true"
// "Create extension property 'Unit.foo'" "true"
// ERROR: Property must be initialized
// WITH_RUNTIME
@@ -1,4 +1,4 @@
// "Create extension property 'foo'" "true"
// "Create extension property 'Unit.foo'" "true"
// ERROR: Property must be initialized
// WITH_RUNTIME
@@ -1,4 +1,4 @@
// "Create extension property 'foo'" "true"
// "Create extension property 'Int.foo'" "true"
// ERROR: Property must be initialized
// WITH_RUNTIME
@@ -1,4 +1,4 @@
// "Create extension property 'foo'" "true"
// "Create extension property 'Int.foo'" "true"
// ERROR: Property must be initialized
// WITH_RUNTIME
@@ -1,4 +1,4 @@
// "Create extension property 'foo'" "true"
// "Create extension property 'Int.foo'" "true"
// ERROR: Property must be initialized
// WITH_RUNTIME
@@ -1,4 +1,4 @@
// "Create extension property 'foo'" "true"
// "Create extension property 'Int.foo'" "true"
// ERROR: Property must be initialized
// WITH_RUNTIME