Create from Usage: Implement "Create type alias" quickfix

#KT-12904 Fixed
This commit is contained in:
Alexey Sedunov
2016-07-20 14:34:49 +03:00
parent 17edbac72b
commit 6a2edabbd4
50 changed files with 555 additions and 101 deletions
@@ -1,5 +1,6 @@
// "Create class 'A'" "false"
// ACTION: Create interface 'A'
// ACTION: Create type alias 'A'
// ACTION: Create test
// ERROR: Unresolved reference: A
package p
@@ -1,6 +1,7 @@
// "Create annotation 'A'" "false"
// ACTION: Create class 'A'
// ACTION: Create interface 'A'
// ACTION: Create type alias 'A'
// ACTION: Convert to block body
// ACTION: Remove explicit type specification
// ERROR: Unresolved reference: A
@@ -5,5 +5,6 @@
// ACTION: Create class 'A'
// ACTION: Create enum 'A'
// ACTION: Create interface 'A'
// ACTION: Create type alias 'A'
// ERROR: Unresolved reference: A
internal fun foo(): J.<caret>A = throw Throwable("")
@@ -3,6 +3,7 @@
// ACTION: Create class 'A'
// ACTION: Create interface 'A'
// ACTION: Create enum 'A'
// ACTION: Create type alias 'A'
// ACTION: Convert to block body
// ACTION: Remove explicit type specification
// ERROR: Unresolved reference: A
@@ -1,6 +1,7 @@
// "Create enum 'A'" "false"
// ACTION: Create class 'A'
// ACTION: Create interface 'A'
// ACTION: Create type alias 'A'
// ACTION: Convert to block body
// ACTION: Remove explicit type specification
// ERROR: Unresolved reference: A
@@ -1,6 +1,7 @@
// "Create annotation 'NotExistent'" "false"
// ACTION: Create class 'NotExistent'
// ACTION: Create interface 'NotExistent'
// ACTION: Create type alias 'NotExistent'
// ACTION: Create test
// ERROR: Unresolved reference: NotExistent
class TPB<X : <caret>NotExistent>
@@ -1,6 +1,7 @@
// "Create annotation 'NotExistent'" "false"
// ACTION: Create class 'NotExistent'
// ACTION: Create interface 'NotExistent'
// ACTION: Create type alias 'NotExistent'
// ACTION: Create test
// ERROR: Unresolved reference: NotExistent
class TPB<X> where X : <caret>NotExistent
@@ -1,6 +1,7 @@
// "Create enum 'NotExistent'" "false"
// ACTION: Create class 'NotExistent'
// ACTION: Create interface 'NotExistent'
// ACTION: Create type alias 'NotExistent'
// ACTION: Create test
// ERROR: Unresolved reference: NotExistent
class TPB<X : <caret>NotExistent>
@@ -1,6 +1,7 @@
// "Create enum 'NotExistent'" "false"
// ACTION: Create class 'NotExistent'
// ACTION: Create interface 'NotExistent'
// ACTION: Create type alias 'NotExistent'
// ACTION: Create test
// ERROR: Unresolved reference: NotExistent
class TPB<X> where X : <caret>NotExistent
@@ -1,6 +1,7 @@
// "Create object 'NotExistent'" "false"
// ACTION: Create class 'NotExistent'
// ACTION: Create interface 'NotExistent'
// ACTION: Create type alias 'NotExistent'
// ACTION: Create test
// ERROR: Unresolved reference: NotExistent
class TPB<X : <caret>NotExistent>
@@ -1,6 +1,7 @@
// "Create object 'NotExistent'" "false"
// ACTION: Create class 'NotExistent'
// ACTION: Create interface 'NotExistent'
// ACTION: Create type alias 'NotExistent'
// ACTION: Create test
// ERROR: Unresolved reference: NotExistent
class TPB<X> where X : <caret>NotExistent
@@ -3,6 +3,7 @@
// ACTION: Create class 'A'
// ACTION: Create interface 'A'
// ACTION: Create enum 'A'
// ACTION: Create type alias 'A'
// ACTION: Convert to block body
// ACTION: Remove explicit type specification
// ERROR: Unresolved reference: A
@@ -1,6 +1,7 @@
// "Create object 'A'" "false"
// ACTION: Create class 'A'
// ACTION: Create interface 'A'
// ACTION: Create type alias 'A'
// ACTION: Convert to block body
// ACTION: Remove explicit type specification
// ERROR: Unresolved reference: A