Move top-level declarations to separate file: Refactoring processor and tests

This commit is contained in:
Alexey Sedunov
2014-03-20 15:34:04 +04:00
parent 6ddcd51af2
commit 5aa75ba3e1
216 changed files with 1770 additions and 42 deletions
@@ -0,0 +1,7 @@
package a
import b.Test
fun bar() {
val t: Test = Test()
}
@@ -0,0 +1,7 @@
package a
import b.Test as _Test
fun bar() {
val t: _Test = _Test()
}
@@ -0,0 +1,7 @@
package a
open class Foo {
open class Bar {
}
}
@@ -0,0 +1,7 @@
package a
import b.Test
fun test(): Test {
return Test()
}
@@ -0,0 +1,9 @@
package a;
import b.Test;
class J {
void bar() {
Test t = new Test();
}
}
@@ -0,0 +1,7 @@
package a
import b.Test
fun bar() {
val t: Test = Test()
}
@@ -0,0 +1,7 @@
package a
import b.Test as _Test
fun bar() {
val t: _Test = _Test()
}
@@ -0,0 +1,16 @@
package b
open class Foo {
open class Bar {
}
}
class Test {
val aFoo: a.Foo = a.Foo()
val bFoo: Foo = Foo()
val cFoo: c.Foo = c.Foo()
val aBar: a.Foo.Bar = a.Foo.Bar()
val bBar: Foo.Bar = Foo.Bar()
val cBar: c.Foo.Bar = c.Foo.Bar()
}
@@ -0,0 +1,7 @@
package b;
class J {
void bar() {
Test t = new Test();
}
}
@@ -0,0 +1,5 @@
package b
fun bar() {
val t: Test = Test()
}
@@ -0,0 +1,7 @@
package b;
class J {
void bar() {
Test t = new Test();
}
}
@@ -0,0 +1,7 @@
package b
import a.*
fun bar() {
val t: Test = Test()
}
@@ -0,0 +1,7 @@
package b;
class J {
void bar() {
Test t = new Test();
}
}
@@ -0,0 +1,7 @@
package b
import b.Test
fun bar() {
val t: Test = Test()
}
@@ -0,0 +1,7 @@
package b
import b.Test as _Test
fun bar() {
val t: _Test = _Test()
}
@@ -0,0 +1,7 @@
package c
open class Foo {
open class Bar {
}
}
@@ -0,0 +1,9 @@
package c;
import b.Test;
class J {
void bar() {
Test t = new Test();
}
}
@@ -0,0 +1,7 @@
package c
import b.Test
fun bar() {
val t: Test = Test()
}
@@ -0,0 +1,9 @@
package c;
import b.Test;
class J {
void bar() {
Test t = new Test();
}
}
@@ -0,0 +1,8 @@
package c
import a.*
import b.Test
fun bar() {
val t: Test = Test()
}
@@ -0,0 +1,9 @@
package c;
import b.Test;
class J {
void bar() {
Test t = new Test();
}
}
@@ -0,0 +1,7 @@
package c
import b.Test
fun bar() {
val t: Test = Test()
}
@@ -0,0 +1,7 @@
package c
import b.Test as _Test
fun bar() {
val t: _Test = _Test()
}
@@ -0,0 +1,5 @@
package a
fun bar() {
val t: Test = Test()
}
@@ -0,0 +1,7 @@
package a
import a.Test as _Test
fun bar() {
val t: _Test = _Test()
}
@@ -0,0 +1,7 @@
package a
open class Foo {
open class Bar {
}
}
@@ -0,0 +1,14 @@
package a
class <caret>Test {
val aFoo: Foo = Foo()
val bFoo: b.Foo = b.Foo()
val cFoo: c.Foo = c.Foo()
val aBar: Foo.Bar = Foo.Bar()
val bBar: b.Foo.Bar = b.Foo.Bar()
val cBar: c.Foo.Bar = c.Foo.Bar()
}
fun test(): Test {
return Test()
}
@@ -0,0 +1,7 @@
package a;
class J {
void bar() {
Test t = new Test();
}
}
@@ -0,0 +1,5 @@
package a
fun bar() {
val t: Test = Test()
}
@@ -0,0 +1,7 @@
package a
import a.Test as _Test
fun bar() {
val t: _Test = _Test()
}
@@ -0,0 +1,8 @@
package b
open class Foo {
open class Bar {
}
}
@@ -0,0 +1,7 @@
package b;
class J {
void bar() {
a.Test t = new a.Test();
}
}
@@ -0,0 +1,5 @@
package b
fun bar() {
val t: a.Test = a.Test()
}
@@ -0,0 +1,9 @@
package b;
import a.*;
class J {
void bar() {
Test t = new Test();
}
}
@@ -0,0 +1,7 @@
package b
import a.*
fun bar() {
val t: Test = Test()
}
@@ -0,0 +1,9 @@
package b;
import a.Test;
class J {
void bar() {
Test t = new Test();
}
}
@@ -0,0 +1,7 @@
package b
import a.Test
fun bar() {
val t: Test = Test()
}
@@ -0,0 +1,7 @@
package b
import a.Test as _Test
fun bar() {
val t: _Test = _Test()
}
@@ -0,0 +1,7 @@
package c
open class Foo {
open class Bar {
}
}
@@ -0,0 +1,7 @@
package c;
class J {
void bar() {
a.Test t = new a.Test();
}
}
@@ -0,0 +1,5 @@
package c
fun bar() {
val t: a.Test = a.Test()
}
@@ -0,0 +1,9 @@
package c;
import a.*;
class J {
void bar() {
Test t = new Test();
}
}
@@ -0,0 +1,7 @@
package c
import a.*
fun bar() {
val t: Test = Test()
}
@@ -0,0 +1,9 @@
package c;
import a.Test;
class J {
void bar() {
Test t = new Test();
}
}
@@ -0,0 +1,7 @@
package c
import a.Test
fun bar() {
val t: Test = Test()
}
@@ -0,0 +1,7 @@
package c
import a.Test as _Test
fun bar() {
val t: _Test = _Test()
}
@@ -0,0 +1,5 @@
{
"mainFile": "a/main.kt",
"type": "MOVE_KOTLIN_TOP_LEVEL_DECLARATIONS",
"targetFile": "b/dependency.kt"
}