Fixed testdata -- removed package import

This commit is contained in:
Stanislav Erokhin
2015-09-13 04:27:53 +03:00
parent 387d16d1d5
commit 8efbf4fc32
56 changed files with 58 additions and 219 deletions
-1
View File
@@ -5,7 +5,6 @@ import java.sql.*
import java.util.ArrayList // maybe dropped on adding import with *
import java.util.Date // should not be dropped because of conflicting java.sql.Date class
import java.util.HashSet as JavaHashSet // alias import should not be dropped
import java.util.concurrent // import of package should not be dropped because packages are not imported by *
fun foo() {
val v1 = JavaHashSet()
-1
View File
@@ -5,7 +5,6 @@ import java.sql.*
import java.util.*
import java.util.Date
import java.util.HashSet as JavaHashSet // alias import should not be dropped
import java.util.concurrent // import of package should not be dropped because packages are not imported by *
fun foo() {
val v1 = JavaHashSet()
-4
View File
@@ -1,4 +0,0 @@
// IMPORT: java.util
package p
fun foo(): util.ArrayList<String> {}
-6
View File
@@ -1,6 +0,0 @@
// IMPORT: java.util
package p
import java.util
fun foo(): util.ArrayList<String> {}
-6
View File
@@ -1,6 +0,0 @@
// IMPORT: java.util
package p
import java.util
fun foo(): util.ArrayList<String> {}
@@ -1,6 +0,0 @@
// IMPORT: java.util
package p
import java.util
fun foo(): util.ArrayList<String> {}
+1 -2
View File
@@ -1,6 +1,5 @@
import java.*
import java.util.*
import java.util
import <error>utils</error>.*
import java.io.PrintStream
@@ -14,7 +13,7 @@ fun test(<warning>l</warning> : List<Int>) {
val <warning>x</warning> : java.<error>List</error>
val <warning>y</warning> : List<Int>
val <warning>b</warning> : <warning>java.lang.Object</warning>
val <warning>a</warning> : <warning>util.List<Int></warning>
val <warning>a</warning> : <warning>java.util.List<Int></warning>
val <warning>z</warning> : java.<error>utils</error>.<error>List</error><Int>
val <warning>f</warning> : java.io.File? = null
+1 -3
View File
@@ -1,5 +1,3 @@
package to
import a.b
val c = b.B()
val c = a.b.B()
@@ -1 +0,0 @@
a.b
+1 -3
View File
@@ -1,5 +1,3 @@
package a
import a.b
<selection>val c = b.B()</selection>
<selection>val c = a.b.B()</selection>
+1 -3
View File
@@ -1,6 +1,4 @@
package testData.libraries
import kotlin as gogland
public fun func(str : gogland.String) {
public fun func(str : kotlin.String) {
}
@@ -6,6 +6,6 @@ fun foo() {
}
// extra.kt
//public fun <1>func(str : gogland.String) {
//public fun <1>func(str : kotlin.String) {
// main.kt
//public fun <2>func(a : Int, b : String = "55") {
+1 -2
View File
@@ -1,9 +1,8 @@
package ppp
import ppp.*
import ppp.ppp1
open class C
class D : C()
class E : ppp1.C1()
class E : ppp.ppp1.C1()
@@ -1,8 +1,6 @@
package ppp
import ppp.ppp1
open class C
class D : C()
class E : ppp1.C1()
class E : ppp.ppp1.C1()
@@ -1,4 +0,0 @@
package test1.test2.test3
public class Class1 {
}
-6
View File
@@ -1,6 +0,0 @@
import test1
import test1.test2
import test1.test2.test3
import test1.test2.test3.Class1
val s: test2.test3.Class1? = null
@@ -1,3 +0,0 @@
import test1.test2
val s: test2.test3.Class1? = null
@@ -1,6 +0,0 @@
import java
import java.util
import java.util.Map
import java.util.Map.Entry
var x : util.Map.Entry<util.List<String>, String>? = null
@@ -1,3 +0,0 @@
import java.util
var x : util.Map.Entry<util.List<String>, String>? = null
@@ -1,9 +1,7 @@
import java.sql
// WITH_RUNTIME
fun getEntry() : Map.Entry<kotlin.Array<String>, java.sql.Array> {
throw Error()
}
val x: Map.Entry<Array<String>, sql.Array> = getEntry()
val x: Map.Entry<Array<String>, java.sql.Array> = getEntry()
@@ -3,14 +3,12 @@ import java.lang.*
import java.lang.Comparable
import java.lang.Comparable
import java.lang.Comparable as Foo
import java.lang
import java.lang as jl
fun <T> a() : java.lang.Comparable<T><caret>? {
return null
}
fun b() : lang.Comparable<String> {
fun b() : java.lang.Comparable<String> {
throw Exception()
}
@@ -18,7 +16,7 @@ fun c() : Foo<String> {
throw Exception()
}
fun d() : jl.Comparable<String>? {
fun d() : java.lang.Comparable<String>? {
return null
}
@@ -1,7 +1,5 @@
// "Change all usages of 'java.lang.Comparable<T>' in this file to 'kotlin.Comparable<T>'" "true"
import java.lang.*
import java.lang
import java.lang as jl
fun <T> a() : Comparable<T>? {
return null
@@ -3,14 +3,12 @@ import java.lang.*
import java.lang.Comparable
import java.lang.Comparable
import java.lang.Comparable as Foo
import java.lang
import java.lang as jl
fun <T> a() : java.lang.Comparable<T>? {
return null
}
fun b() : lang.Comparable<String> {
fun b() : java.lang.Comparable<String> {
throw Exception()
}
@@ -18,7 +16,7 @@ fun c() : Foo<String> {
throw Exception()
}
fun d() : jl.Comparable<String><caret>? {
fun d() : java.lang.Comparable<String><caret>? {
return null
}
@@ -1,7 +1,5 @@
// "Change all usages of 'java.lang.Comparable<T>' in this file to 'kotlin.Comparable<T>'" "true"
import java.lang.*
import java.lang
import java.lang as jl
fun <T> a() : Comparable<T>? {
return null
@@ -3,14 +3,12 @@ import java.lang.*
import java.lang.Comparable
import java.lang.Comparable
import java.lang.Comparable<caret> as Foo
import java.lang
import java.lang as jl
fun <T> a() : java.lang.Comparable<T>? {
return null
}
fun b() : lang.Comparable<String> {
fun b() : java.lang.Comparable<String> {
throw Exception()
}
@@ -18,7 +16,7 @@ fun c() : Foo<String> {
throw Exception()
}
fun d() : jl.Comparable<String>? {
fun d() : java.lang.Comparable<String>? {
return null
}
@@ -1,7 +1,5 @@
// "Change all usages of 'java.lang.Comparable<T>' in this file to 'kotlin.Comparable<T>'" "true"
import java.lang.*
import java.lang
import java.lang as jl
fun <T> a() : Comparable<T>? {
return null
@@ -3,14 +3,12 @@ import java.lang.*
import java.lang.Iterable
import java.lang.Iterable
import java.lang.Iterable as Foo
import java.lang
import java.lang as jl
fun <T> a() : java.lang.Iterable<T>? {
return null
}
fun b() : lang.Iterable<String>? {
fun b() : java.lang.Iterable<String>? {
return null
}
@@ -18,7 +16,7 @@ fun c() : Foo<String><caret> {
throw Exception()
}
fun d() : jl.Iterable<String>? {
fun d() : java.lang.Iterable<String>? {
return null
}
@@ -1,7 +1,5 @@
// "Change all usages of 'java.lang.Iterable<T>' in this file to a Kotlin class" "true"
import java.lang.*
import java.lang
import java.lang as jl
fun <T> a() : Iterable<T>? {
return null
@@ -1,5 +1,3 @@
import b.a
fun bar() {
val t: a.A = a.A()
val t: b.a.A = b.a.A()
}
@@ -1,10 +1,8 @@
package c
import b.a
fun bar() {
val t: a.A = a.A()
a.foo()
println(a.x)
a.x = ""
val t: b.a.A = b.a.A()
b.a.foo()
println(b.a.x)
b.a.x = ""
}
@@ -1,14 +1,13 @@
package testing.rename2
import testing.rename.Third
import testing.rename
import java.util.ArrayList
// Extends testing.rename.Third
public class Second : Third() {
val temp : testing.rename.Third = Third()
fun tempName(param : Third) : rename.Third {
fun tempName(param : Third) : testing.rename.Third {
val local = Third()
val otherLocal = param
val arr = ArrayList<Third>()
@@ -1,14 +1,13 @@
package testing.rename2
import testing.rename.First
import testing.rename
import java.util.ArrayList
// Extends testing.rename.First
public class Second : First() {
val temp : testing.rename.First = First()
fun tempName(param : First) : rename.First {
fun tempName(param : First) : testing.rename.First {
val local = First()
val otherLocal = param
val arr = ArrayList<First>()
+1 -3
View File
@@ -1,5 +1,3 @@
import java.lang.reflect
fun foo(array: Array<String>){}
val v: reflect.Array
val v: java.lang.reflect.Array
@@ -1,4 +1,3 @@
import java.sql
import java.util.Date
val x = sql.Date(1)
val x = java.sql.Date(1)
@@ -1,7 +1,5 @@
import java.io
fun File(): String = ""
class A {
val x = io.File()
val x = java.io.File()
}
@@ -1,7 +1,5 @@
import java.util
fun Random(): Int = 1
class A {
val x = util.Random()
val x = java.util.Random()
}
@@ -1,6 +1,4 @@
import java.util
fun foo(){
val Random = {}
val x = util.Random()
val x = java.util.Random()
}
@@ -1,8 +1,6 @@
import java.io
fun File(p: Int): String = ""
fun File(p: String): String = ""
class A {
val x = io.File()
val x = java.io.File()
}
@@ -1,4 +1,3 @@
import java.sql
import java.util.Date
val x = sql.Date(1)
val x = java.sql.Date(1)
@@ -1,4 +1,3 @@
import java.sql
import java.util.Date
class A : sql.Date
class A : java.sql.Date
+1 -3
View File
@@ -1,3 +1 @@
import java.sql
val x: Map.Entry<Array<String>, sql.Array>
val x: Map.Entry<Array<String>, java.sql.Array>
+1 -2
View File
@@ -1,4 +1,3 @@
import java.sql
import java.util.Date
class A : sql.Date
class A : java.sql.Date
@@ -1,7 +1,6 @@
import java.sql
import java.util.Date
import java.util.HashMap
class A {
val x: HashMap<Date, sql.Date>
val x: HashMap<Date, java.sql.Date>
}