Fix MovePropertyToConstructorIntention and broken tests

This commit is contained in:
Vyacheslav Gerasimov
2017-03-24 21:52:53 +03:00
parent efa03e7ad8
commit 8c41e44b3b
9 changed files with 10 additions and 0 deletions
@@ -3,6 +3,7 @@
// ACTION: Create parameter 'foo'
// ACTION: Create property 'foo'
// ACTION: Rename reference
// ACTION: Move to constructor
// ERROR: Unresolved reference: foo
class A {
@@ -1,6 +1,7 @@
// "Make bar internal" "false"
// ACTION: Convert property initializer to getter
// ACTION: Add names to call arguments
// ACTION: Move to constructor
// ERROR: Cannot access 'bar': it is private in 'First'
private data class Data(val x: Int)
@@ -1,5 +1,6 @@
// "Change type of overriden property 'A.x' to '(Int) -> Int'" "false"
// ACTION: Change type to '(String) -> Int'
// ACTION: Move to constructor
// ERROR: Type of 'x' is not a subtype of the overridden property 'public abstract val x: (String) -> Int defined in A'
interface A {
val x: (String) -> Int
+1
View File
@@ -2,6 +2,7 @@
// ACTION: Convert property to function
// ACTION: Introduce backing property
// ACTION: Move to companion object
// ACTION: Move to constructor
// ERROR: Unresolved reference: foo
class A() {
@@ -1,5 +1,6 @@
// "Change type to '(String) -> [ERROR : Ay]'" "false"
// ACTION: Change type of base property 'A.x' to '(Int) -> Int'
// ACTION: Move to constructor
// ERROR: Type of 'x' is not a subtype of the overridden property 'public abstract val x: (String) -> [ERROR : Ay] defined in A'
// ERROR: Unresolved reference: Ay
interface A {
+1
View File
@@ -1,5 +1,6 @@
// "Replace array of boxed with array of primitive" "false"
// ACTION: Convert to secondary constructor
// ACTION: Move to class body
// ERROR: Invalid type of annotation member
annotation class SuperAnnotation(
val foo: <caret>Array<*>,
@@ -1,5 +1,6 @@
// "Replace array of boxed with array of primitive" "false"
// ACTION: Convert to secondary constructor
// ACTION: Move to class body
annotation class SuperAnnotation(
val str: <caret>Array<String>
)
@@ -4,5 +4,6 @@
// ACTION: Make protected
// ACTION: Create test
// ACTION: Convert to secondary constructor
// ACTION: Move to class body
class C(<caret>val x: String) {
}