diff --git a/compiler/testData/codegen/jdk-annotations/hashMap.kt b/compiler/testData/codegen/jdk-annotations/hashMap.kt index db30d64a761..03205db2598 100644 --- a/compiler/testData/codegen/jdk-annotations/hashMap.kt +++ b/compiler/testData/codegen/jdk-annotations/hashMap.kt @@ -1,7 +1,7 @@ import java.util.* fun box(): String { - val map: Map = HashMap() + val map: MutableMap = HashMap() map.put("a", 1) map.put("bb", 2) map.put("ccc", 3) diff --git a/compiler/testData/codegen/regressions/kt1397.kt b/compiler/testData/codegen/regressions/kt1397.kt index 9f61e573ed1..834d543942f 100644 --- a/compiler/testData/codegen/regressions/kt1397.kt +++ b/compiler/testData/codegen/regressions/kt1397.kt @@ -1,7 +1,7 @@ import java.util.ArrayList class IntArrayList(): ArrayList() { - override fun get(index: Int): Int = super.get(index)!! + override fun get(index: Int): Int = super.get(index) } fun box(): String { diff --git a/compiler/testData/codegen/regressions/kt2395.kt b/compiler/testData/codegen/regressions/kt2395.kt index 7a0401ec171..a3578106dd7 100644 --- a/compiler/testData/codegen/regressions/kt2395.kt +++ b/compiler/testData/codegen/regressions/kt2395.kt @@ -2,7 +2,7 @@ import java.util.AbstractList class MyList(): AbstractList() { public fun getModificationCount(): Int = modCount - public override fun get(index: Int): String? = "" + public override fun get(index: Int): String = "" public override fun size(): Int = 0 } diff --git a/compiler/testData/codegen/regressions/kt950.jet b/compiler/testData/codegen/regressions/kt950.jet index 40e572f79b2..adb6c062f11 100644 --- a/compiler/testData/codegen/regressions/kt950.jet +++ b/compiler/testData/codegen/regressions/kt950.jet @@ -1,6 +1,6 @@ import java.util.* -fun Map.set(k : K, v : V) = put(k, v) +fun MutableMap.set(k : K, v : V) = put(k, v) fun box() : String { val map = HashMap() diff --git a/compiler/testData/codegen/super/basicmethodSuperClass.jet b/compiler/testData/codegen/super/basicmethodSuperClass.jet index 06344019298..1b8a48bbfe9 100644 --- a/compiler/testData/codegen/super/basicmethodSuperClass.jet +++ b/compiler/testData/codegen/super/basicmethodSuperClass.jet @@ -1,7 +1,7 @@ import java.util.ArrayList class N() : ArrayList() { - override fun add(el: Any?) : Boolean { + override fun add(el: Any) : Boolean { if (!super.add(el)) { throw Exception() } diff --git a/compiler/testData/compileJavaAgainstKotlin/method/ListOfInt.kt b/compiler/testData/compileJavaAgainstKotlin/method/ListOfInt.kt index 68a378b4013..882b5df1375 100644 --- a/compiler/testData/compileJavaAgainstKotlin/method/ListOfInt.kt +++ b/compiler/testData/compileJavaAgainstKotlin/method/ListOfInt.kt @@ -1,3 +1 @@ -import java.util.List - fun ggg(list: List) = list diff --git a/compiler/testData/compileJavaAgainstKotlin/method/ListOfString.kt b/compiler/testData/compileJavaAgainstKotlin/method/ListOfString.kt index 96574032154..1fdd7cc33ce 100644 --- a/compiler/testData/compileJavaAgainstKotlin/method/ListOfString.kt +++ b/compiler/testData/compileJavaAgainstKotlin/method/ListOfString.kt @@ -1,3 +1 @@ -import java.util.List - fun ff(p: List) = 1 diff --git a/compiler/testData/compileJavaAgainstKotlin/method/ListOfT.kt b/compiler/testData/compileJavaAgainstKotlin/method/ListOfT.kt index c9a6722ad16..13571dff832 100644 --- a/compiler/testData/compileJavaAgainstKotlin/method/ListOfT.kt +++ b/compiler/testData/compileJavaAgainstKotlin/method/ListOfT.kt @@ -1,3 +1 @@ -import java.util.List - fun

listOfT(list: List

) = list diff --git a/compiler/testData/compileJavaAgainstKotlin/method/MapOfKString.kt b/compiler/testData/compileJavaAgainstKotlin/method/MapOfKString.kt index 3ec40cc8f4b..f3b3b85476b 100644 --- a/compiler/testData/compileJavaAgainstKotlin/method/MapOfKString.kt +++ b/compiler/testData/compileJavaAgainstKotlin/method/MapOfKString.kt @@ -1,3 +1,2 @@ -import java.util.Map fun fff(map: Map) = map diff --git a/compiler/testData/compileJavaAgainstKotlin/method/MapOfStringIntQ.kt b/compiler/testData/compileJavaAgainstKotlin/method/MapOfStringIntQ.kt index b9f78cd4c89..324a55bd3ba 100644 --- a/compiler/testData/compileJavaAgainstKotlin/method/MapOfStringIntQ.kt +++ b/compiler/testData/compileJavaAgainstKotlin/method/MapOfStringIntQ.kt @@ -1,3 +1,2 @@ -import java.util.Map fun fff(map: Map) = map diff --git a/compiler/testData/compileJavaAgainstKotlin/method/QExtendsListString.kt b/compiler/testData/compileJavaAgainstKotlin/method/QExtendsListString.kt index 40dc99ff079..a6d938f90ea 100644 --- a/compiler/testData/compileJavaAgainstKotlin/method/QExtendsListString.kt +++ b/compiler/testData/compileJavaAgainstKotlin/method/QExtendsListString.kt @@ -1,3 +1 @@ -import java.util.List - fun > id(p: P1) = p diff --git a/compiler/testData/compileJavaAgainstKotlin/method/Vararg.kt b/compiler/testData/compileJavaAgainstKotlin/method/Vararg.kt index 7a584e978d5..9318d6faf34 100644 --- a/compiler/testData/compileJavaAgainstKotlin/method/Vararg.kt +++ b/compiler/testData/compileJavaAgainstKotlin/method/Vararg.kt @@ -1,3 +1 @@ -import java.util.List; - fun gg(list: List, vararg ints: Int) = list diff --git a/compiler/testData/loadJava/ClassWithTypePExtendsIterableP.kt b/compiler/testData/loadJava/ClassWithTypePExtendsIterableP.kt index 79ed65d1ec2..b3d331d9e4d 100644 --- a/compiler/testData/loadJava/ClassWithTypePExtendsIterableP.kt +++ b/compiler/testData/loadJava/ClassWithTypePExtendsIterableP.kt @@ -1,4 +1,4 @@ package test -public abstract class ClassWithTypePExtendsIterableP

() : jet.Iterable

{ +public abstract class ClassWithTypePExtendsIterableP

() : jet.MutableIterable

{ } diff --git a/compiler/testData/loadJava/ClassWithTypePExtendsIterableP.txt b/compiler/testData/loadJava/ClassWithTypePExtendsIterableP.txt index c382350067f..781f2bde8d7 100644 --- a/compiler/testData/loadJava/ClassWithTypePExtendsIterableP.txt +++ b/compiler/testData/loadJava/ClassWithTypePExtendsIterableP.txt @@ -1,6 +1,6 @@ namespace test -public abstract class test.ClassWithTypePExtendsIterableP : jet.Iterable

{ +public abstract class test.ClassWithTypePExtendsIterableP : jet.MutableIterable

{ public final /*constructor*/ fun (): test.ClassWithTypePExtendsIterableP

- public abstract override /*1*/ fun iterator(): jet.Iterator

+ public abstract override /*1*/ fun iterator(): jet.MutableIterator

} diff --git a/compiler/testData/loadJava/kotlinSignature/MethodWithGenerics.txt b/compiler/testData/loadJava/kotlinSignature/MethodWithGenerics.txt index 04c4465f25f..a7e5adbdac1 100644 --- a/compiler/testData/loadJava/kotlinSignature/MethodWithGenerics.txt +++ b/compiler/testData/loadJava/kotlinSignature/MethodWithGenerics.txt @@ -2,5 +2,5 @@ namespace test public open class test.MethodWithGenerics : java.lang.Object { public final /*constructor*/ fun (): test.MethodWithGenerics - public open fun foo(/*0*/ p0: jet.String, /*1*/ p1: java.util.List?>): jet.String + public open fun foo(/*0*/ p0: jet.String, /*1*/ p1: jet.List?>): jet.String } diff --git a/compiler/testData/loadJava/kotlinSignature/MethodWithTypeParameters.txt b/compiler/testData/loadJava/kotlinSignature/MethodWithTypeParameters.txt index 6ef83364775..985fa40f97e 100644 --- a/compiler/testData/loadJava/kotlinSignature/MethodWithTypeParameters.txt +++ b/compiler/testData/loadJava/kotlinSignature/MethodWithTypeParameters.txt @@ -2,5 +2,5 @@ namespace test public open class test.MethodWithTypeParameters : java.lang.Object { public final /*constructor*/ fun (): test.MethodWithTypeParameters - public open fun >foo(/*0*/ p0: A, /*1*/ p1: java.util.List, /*2*/ p2: java.util.List): jet.Tuple0 + public open fun >foo(/*0*/ p0: A, /*1*/ p1: jet.List, /*2*/ p2: jet.List): jet.Tuple0 } diff --git a/compiler/testData/loadJava/kotlinSignature/error/WrongReturnTypeStructure.txt b/compiler/testData/loadJava/kotlinSignature/error/WrongReturnTypeStructure.txt index b0374efd9a6..633cb59ba14 100644 --- a/compiler/testData/loadJava/kotlinSignature/error/WrongReturnTypeStructure.txt +++ b/compiler/testData/loadJava/kotlinSignature/error/WrongReturnTypeStructure.txt @@ -2,5 +2,5 @@ namespace test public open class test.WrongReturnTypeStructure : java.lang.Object { public final /*constructor*/ fun (): test.WrongReturnTypeStructure - public open fun foo(/*0*/ p0: jet.String?, /*1*/ p1: java.util.List?>?): jet.String? + public open fun foo(/*0*/ p0: jet.String?, /*1*/ p1: jet.List?>?): jet.String? } diff --git a/compiler/testData/loadJava/kotlinSignature/error/WrongTypeParameterBoundStructure1.txt b/compiler/testData/loadJava/kotlinSignature/error/WrongTypeParameterBoundStructure1.txt index 248bf8f3801..6020642cadf 100644 --- a/compiler/testData/loadJava/kotlinSignature/error/WrongTypeParameterBoundStructure1.txt +++ b/compiler/testData/loadJava/kotlinSignature/error/WrongTypeParameterBoundStructure1.txt @@ -2,5 +2,5 @@ namespace test public open class test.WrongTypeParameterBoundStructure1 : java.lang.Object { public final /*constructor*/ fun (): test.WrongTypeParameterBoundStructure1 - public open fun ?>foo(/*0*/ p0: A?, /*1*/ p1: java.util.List?, /*2*/ p2: java.util.List?): jet.Tuple0 + public open fun ?>foo(/*0*/ p0: A?, /*1*/ p1: jet.List?, /*2*/ p2: jet.List?): jet.Tuple0 } diff --git a/compiler/testData/loadJava/kotlinSignature/error/WrongTypeParameterBoundStructure2.txt b/compiler/testData/loadJava/kotlinSignature/error/WrongTypeParameterBoundStructure2.txt index 7afa15e6cc7..548dc37963c 100644 --- a/compiler/testData/loadJava/kotlinSignature/error/WrongTypeParameterBoundStructure2.txt +++ b/compiler/testData/loadJava/kotlinSignature/error/WrongTypeParameterBoundStructure2.txt @@ -2,5 +2,5 @@ namespace test public open class test.WrongTypeParameterBoundStructure2 : java.lang.Object { public final /*constructor*/ fun (): test.WrongTypeParameterBoundStructure2 - public open fun ?>foo(/*0*/ p0: A?, /*1*/ p1: java.util.List?, /*2*/ p2: java.util.List?): jet.Tuple0 + public open fun ?>foo(/*0*/ p0: A?, /*1*/ p1: jet.List?, /*2*/ p2: jet.List?): jet.Tuple0 } diff --git a/compiler/testData/loadJava/kotlinSignature/error/WrongTypeParametersCount.txt b/compiler/testData/loadJava/kotlinSignature/error/WrongTypeParametersCount.txt index 0a2850ab168..99789f5bcea 100644 --- a/compiler/testData/loadJava/kotlinSignature/error/WrongTypeParametersCount.txt +++ b/compiler/testData/loadJava/kotlinSignature/error/WrongTypeParametersCount.txt @@ -2,5 +2,5 @@ namespace test public open class test.WrongTypeParametersCount : java.lang.Object { public final /*constructor*/ fun (): test.WrongTypeParametersCount - public open fun foo(/*0*/ p0: A?, /*1*/ p1: java.util.List?): jet.Tuple0 + public open fun foo(/*0*/ p0: A?, /*1*/ p1: jet.List?): jet.Tuple0 } diff --git a/compiler/testData/loadJava/kotlinSignature/error/WrongTypeVariance.java b/compiler/testData/loadJava/kotlinSignature/error/WrongTypeVariance.java index c8269205606..c0d78a9e48f 100644 --- a/compiler/testData/loadJava/kotlinSignature/error/WrongTypeVariance.java +++ b/compiler/testData/loadJava/kotlinSignature/error/WrongTypeVariance.java @@ -8,7 +8,7 @@ import java.util.List; import jet.runtime.typeinfo.KotlinSignature; public class WrongTypeVariance { - @KotlinSignature("fun copy(a : List, b : List) : List") + @KotlinSignature("fun copy(a : List, b : List) : MutableList") public List copy(List from, List to) { throw new UnsupportedOperationException(); } diff --git a/compiler/testData/loadJava/kotlinSignature/error/WrongTypeVariance.kt b/compiler/testData/loadJava/kotlinSignature/error/WrongTypeVariance.kt index 272d8f4180c..6c1211c775c 100644 --- a/compiler/testData/loadJava/kotlinSignature/error/WrongTypeVariance.kt +++ b/compiler/testData/loadJava/kotlinSignature/error/WrongTypeVariance.kt @@ -3,7 +3,7 @@ package test import java.util.* public open class WrongTypeVariance : Object() { - public open fun copy(p0 : List?, p1 : List?) : List? { + public open fun copy(p0 : List?, p1 : List?) : MutableList? { throw UnsupportedOperationException() } } diff --git a/compiler/testData/loadJava/kotlinSignature/error/WrongTypeVariance.txt b/compiler/testData/loadJava/kotlinSignature/error/WrongTypeVariance.txt index 2bcd8a6cccf..17a7336f056 100644 --- a/compiler/testData/loadJava/kotlinSignature/error/WrongTypeVariance.txt +++ b/compiler/testData/loadJava/kotlinSignature/error/WrongTypeVariance.txt @@ -2,5 +2,5 @@ namespace test public open class test.WrongTypeVariance : java.lang.Object { public final /*constructor*/ fun (): test.WrongTypeVariance - public open fun copy(/*0*/ p0: java.util.List?, /*1*/ p1: java.util.List?): java.util.List? + public open fun copy(/*0*/ p0: jet.List?, /*1*/ p1: jet.List?): jet.MutableList? } diff --git a/compiler/testData/loadJava/kotlinSignature/error/WrongValueParameterStructure1.txt b/compiler/testData/loadJava/kotlinSignature/error/WrongValueParameterStructure1.txt index 1b384389793..34118471c98 100644 --- a/compiler/testData/loadJava/kotlinSignature/error/WrongValueParameterStructure1.txt +++ b/compiler/testData/loadJava/kotlinSignature/error/WrongValueParameterStructure1.txt @@ -2,5 +2,5 @@ namespace test public open class test.WrongValueParameterStructure1 : java.lang.Object { public final /*constructor*/ fun (): test.WrongValueParameterStructure1 - public open fun foo(/*0*/ p0: jet.String?, /*1*/ p1: java.util.List?>?): jet.String? + public open fun foo(/*0*/ p0: jet.String?, /*1*/ p1: jet.List?>?): jet.String? } diff --git a/compiler/testData/loadJava/kotlinSignature/error/WrongValueParameterStructure2.txt b/compiler/testData/loadJava/kotlinSignature/error/WrongValueParameterStructure2.txt index c2f053e8203..e45fe846a05 100644 --- a/compiler/testData/loadJava/kotlinSignature/error/WrongValueParameterStructure2.txt +++ b/compiler/testData/loadJava/kotlinSignature/error/WrongValueParameterStructure2.txt @@ -2,5 +2,5 @@ namespace test public open class test.WrongValueParameterStructure2 : java.lang.Object { public final /*constructor*/ fun (): test.WrongValueParameterStructure2 - public open fun foo(/*0*/ p0: jet.String?, /*1*/ p1: java.util.List?>?): jet.String? + public open fun foo(/*0*/ p0: jet.String?, /*1*/ p1: jet.List?>?): jet.String? } diff --git a/compiler/testData/loadJava/modality/ModalityOfFakeOverrides.java b/compiler/testData/loadJava/modality/ModalityOfFakeOverrides.java index d837abe14a9..b46961635d8 100644 --- a/compiler/testData/loadJava/modality/ModalityOfFakeOverrides.java +++ b/compiler/testData/loadJava/modality/ModalityOfFakeOverrides.java @@ -1,9 +1,11 @@ package test; +import org.jetbrains.annotations.NotNull; import java.util.AbstractList; public class ModalityOfFakeOverrides extends AbstractList { @Override + @NotNull public String get(int index) { return ""; } diff --git a/compiler/testData/loadJava/modality/ModalityOfFakeOverrides.kt b/compiler/testData/loadJava/modality/ModalityOfFakeOverrides.kt index d654c5eea78..47d144d8c2d 100644 --- a/compiler/testData/loadJava/modality/ModalityOfFakeOverrides.kt +++ b/compiler/testData/loadJava/modality/ModalityOfFakeOverrides.kt @@ -3,7 +3,7 @@ package test import java.util.AbstractList public open class ModalityOfFakeOverrides : AbstractList() { - override fun get(p0: Int): String? { + override fun get(p0: Int): String { return "" } diff --git a/compiler/testData/loadJava/modality/ModalityOfFakeOverrides.txt b/compiler/testData/loadJava/modality/ModalityOfFakeOverrides.txt index 224a5da6be8..23203e97571 100644 --- a/compiler/testData/loadJava/modality/ModalityOfFakeOverrides.txt +++ b/compiler/testData/loadJava/modality/ModalityOfFakeOverrides.txt @@ -2,29 +2,29 @@ namespace test public open class test.ModalityOfFakeOverrides : java.util.AbstractList { public final /*constructor*/ fun (): test.ModalityOfFakeOverrides - public open override /*1*/ fun add(/*0*/ p0: jet.Int, /*1*/ p1: jet.String?): jet.Tuple0 - public open override /*1*/ fun add(/*0*/ p0: jet.String?): jet.Boolean - public open override /*1*/ fun addAll(/*0*/ p0: java.util.Collection?): jet.Boolean - public open override /*1*/ fun addAll(/*0*/ p0: jet.Int, /*1*/ p1: java.util.Collection?): jet.Boolean + public open override /*1*/ fun add(/*0*/ p0: jet.Int, /*1*/ p1: jet.String): jet.Tuple0 + public open override /*1*/ fun add(/*0*/ p0: jet.String): jet.Boolean + public open override /*1*/ fun addAll(/*0*/ p0: jet.Collection): jet.Boolean + public open override /*1*/ fun addAll(/*0*/ p0: jet.Int, /*1*/ p1: jet.Collection): jet.Boolean public open override /*1*/ fun clear(): jet.Tuple0 public open override /*1*/ fun contains(/*0*/ p0: jet.Any?): jet.Boolean - public open override /*1*/ fun containsAll(/*0*/ p0: java.util.Collection?): jet.Boolean - public open override /*1*/ fun get(/*0*/ p0: jet.Int): jet.String? + public open override /*1*/ fun containsAll(/*0*/ p0: jet.Collection): jet.Boolean + public open override /*1*/ fun get(/*0*/ p0: jet.Int): jet.String public open override /*1*/ fun indexOf(/*0*/ p0: jet.Any?): jet.Int public open override /*1*/ fun isEmpty(): jet.Boolean - public open override /*1*/ fun iterator(): jet.MutableIterator? + public open override /*1*/ fun iterator(): jet.MutableIterator public open override /*1*/ fun lastIndexOf(/*0*/ p0: jet.Any?): jet.Int - public open override /*1*/ fun listIterator(): java.util.ListIterator? - public open override /*1*/ fun listIterator(/*0*/ p0: jet.Int): java.util.ListIterator? + public open override /*1*/ fun listIterator(): jet.MutableListIterator + public open override /*1*/ fun listIterator(/*0*/ p0: jet.Int): jet.MutableListIterator protected final override /*1*/ var modCount: jet.Int public open override /*1*/ fun remove(/*0*/ p0: jet.Any?): jet.Boolean public open override /*1*/ fun remove(/*0*/ p0: jet.Int): jet.String? - public open override /*1*/ fun removeAll(/*0*/ p0: java.util.Collection?): jet.Boolean + public open override /*1*/ fun removeAll(/*0*/ p0: jet.Collection): jet.Boolean protected open override /*1*/ fun removeRange(/*0*/ p0: jet.Int, /*1*/ p1: jet.Int): jet.Tuple0 - public open override /*1*/ fun retainAll(/*0*/ p0: java.util.Collection?): jet.Boolean - public open override /*1*/ fun set(/*0*/ p0: jet.Int, /*1*/ p1: jet.String?): jet.String? + public open override /*1*/ fun retainAll(/*0*/ p0: jet.Collection): jet.Boolean + public open override /*1*/ fun set(/*0*/ p0: jet.Int, /*1*/ p1: jet.String): jet.String public open override /*1*/ fun size(): jet.Int - public open override /*1*/ fun subList(/*0*/ p0: jet.Int, /*1*/ p1: jet.Int): java.util.List? - public open override /*1*/ fun toArray(): jet.Array? - public open override /*1*/ fun toArray(/*0*/ p0: jet.Array?): jet.Array? + public open override /*1*/ fun subList(/*0*/ p0: jet.Int, /*1*/ p1: jet.Int): jet.MutableList + public open override /*1*/ fun toArray(): jet.Array + public open override /*1*/ fun toArray(/*0*/ p0: jet.Array): jet.Array } diff --git a/compiler/testData/loadKotlin/constructor/ConstructorCollectionParameter.kt b/compiler/testData/loadKotlin/constructor/ConstructorCollectionParameter.kt index 18bd6c956fb..c8df6924ea0 100644 --- a/compiler/testData/loadKotlin/constructor/ConstructorCollectionParameter.kt +++ b/compiler/testData/loadKotlin/constructor/ConstructorCollectionParameter.kt @@ -1,5 +1,3 @@ package test -import java.util.Collection - class TestingKotlinCollections(val arguments: Collection) diff --git a/compiler/testData/loadKotlin/constructor/ConstructorCollectionParameter.txt b/compiler/testData/loadKotlin/constructor/ConstructorCollectionParameter.txt index 5c6b7250bc5..46f80e87879 100644 --- a/compiler/testData/loadKotlin/constructor/ConstructorCollectionParameter.txt +++ b/compiler/testData/loadKotlin/constructor/ConstructorCollectionParameter.txt @@ -1,6 +1,6 @@ namespace test internal final class test.TestingKotlinCollections : jet.Any { - public final /*constructor*/ fun (/*0*/ arguments: java.util.Collection): test.TestingKotlinCollections - internal final val arguments: java.util.Collection + public final /*constructor*/ fun (/*0*/ arguments: jet.Collection): test.TestingKotlinCollections + internal final val arguments: jet.Collection } diff --git a/compiler/testData/loadKotlin/fun/genericWithoutTypeVariables/FunClassParamNotNull.kt b/compiler/testData/loadKotlin/fun/genericWithoutTypeVariables/FunClassParamNotNull.kt index 3ead3d4c8be..579b58aadf6 100644 --- a/compiler/testData/loadKotlin/fun/genericWithoutTypeVariables/FunClassParamNotNull.kt +++ b/compiler/testData/loadKotlin/fun/genericWithoutTypeVariables/FunClassParamNotNull.kt @@ -1,6 +1,3 @@ package test -import java.util.List -import java.lang.CharSequence - fun ff(p: List) = 1 diff --git a/compiler/testData/loadKotlin/fun/genericWithoutTypeVariables/FunClassParamNotNull.txt b/compiler/testData/loadKotlin/fun/genericWithoutTypeVariables/FunClassParamNotNull.txt index 2f82b0fb738..f217cdc7f91 100644 --- a/compiler/testData/loadKotlin/fun/genericWithoutTypeVariables/FunClassParamNotNull.txt +++ b/compiler/testData/loadKotlin/fun/genericWithoutTypeVariables/FunClassParamNotNull.txt @@ -1,3 +1,3 @@ namespace test -internal final fun ff(/*0*/ p: java.util.List): jet.Int +internal final fun ff(/*0*/ p: jet.List): jet.Int diff --git a/compiler/testData/loadKotlin/fun/genericWithoutTypeVariables/FunClassParamNullable.kt b/compiler/testData/loadKotlin/fun/genericWithoutTypeVariables/FunClassParamNullable.kt index 92c624f3937..72d5f38b6ac 100644 --- a/compiler/testData/loadKotlin/fun/genericWithoutTypeVariables/FunClassParamNullable.kt +++ b/compiler/testData/loadKotlin/fun/genericWithoutTypeVariables/FunClassParamNullable.kt @@ -1,6 +1,5 @@ package test -import java.util.List import java.lang.CharSequence fun ff(p: List) = 1 diff --git a/compiler/testData/loadKotlin/fun/genericWithoutTypeVariables/FunClassParamNullable.txt b/compiler/testData/loadKotlin/fun/genericWithoutTypeVariables/FunClassParamNullable.txt index 81bd269f6d6..96ab39af741 100644 --- a/compiler/testData/loadKotlin/fun/genericWithoutTypeVariables/FunClassParamNullable.txt +++ b/compiler/testData/loadKotlin/fun/genericWithoutTypeVariables/FunClassParamNullable.txt @@ -1,3 +1,3 @@ namespace test -internal final fun ff(/*0*/ p: java.util.List): jet.Int +internal final fun ff(/*0*/ p: jet.List): jet.Int diff --git a/compiler/testData/loadKotlin/fun/genericWithoutTypeVariables/ReturnTypeClassParamNotNull.kt b/compiler/testData/loadKotlin/fun/genericWithoutTypeVariables/ReturnTypeClassParamNotNull.kt index e0c7fddcb44..707851e3879 100644 --- a/compiler/testData/loadKotlin/fun/genericWithoutTypeVariables/ReturnTypeClassParamNotNull.kt +++ b/compiler/testData/loadKotlin/fun/genericWithoutTypeVariables/ReturnTypeClassParamNotNull.kt @@ -1,7 +1,5 @@ package test -import java.util.List import java.util.ArrayList -import java.lang.CharSequence fun ffgg(): List = ArrayList() diff --git a/compiler/testData/loadKotlin/fun/genericWithoutTypeVariables/ReturnTypeClassParamNotNull.txt b/compiler/testData/loadKotlin/fun/genericWithoutTypeVariables/ReturnTypeClassParamNotNull.txt index 2d7de5ee5e9..82ddf22c9d9 100644 --- a/compiler/testData/loadKotlin/fun/genericWithoutTypeVariables/ReturnTypeClassParamNotNull.txt +++ b/compiler/testData/loadKotlin/fun/genericWithoutTypeVariables/ReturnTypeClassParamNotNull.txt @@ -1,3 +1,3 @@ namespace test -internal final fun ffgg(): java.util.List +internal final fun ffgg(): jet.List diff --git a/compiler/testData/loadKotlin/fun/genericWithoutTypeVariables/ReturnTypeClassParamNullable.kt b/compiler/testData/loadKotlin/fun/genericWithoutTypeVariables/ReturnTypeClassParamNullable.kt index 2442e8f56bc..82ffcc17972 100644 --- a/compiler/testData/loadKotlin/fun/genericWithoutTypeVariables/ReturnTypeClassParamNullable.kt +++ b/compiler/testData/loadKotlin/fun/genericWithoutTypeVariables/ReturnTypeClassParamNullable.kt @@ -1,7 +1,5 @@ package test -import java.util.List import java.util.ArrayList -import java.lang.CharSequence fun ffgg(): List = ArrayList() diff --git a/compiler/testData/loadKotlin/fun/genericWithoutTypeVariables/ReturnTypeClassParamNullable.txt b/compiler/testData/loadKotlin/fun/genericWithoutTypeVariables/ReturnTypeClassParamNullable.txt index 3eb062f42a6..e207069fab1 100644 --- a/compiler/testData/loadKotlin/fun/genericWithoutTypeVariables/ReturnTypeClassParamNullable.txt +++ b/compiler/testData/loadKotlin/fun/genericWithoutTypeVariables/ReturnTypeClassParamNullable.txt @@ -1,3 +1,3 @@ namespace test -internal final fun ffgg(): java.util.List +internal final fun ffgg(): jet.List diff --git a/compiler/testData/loadKotlin/prop/CollectionSize.kt b/compiler/testData/loadKotlin/prop/CollectionSize.kt index 8ab57de53f1..675cb097965 100644 --- a/compiler/testData/loadKotlin/prop/CollectionSize.kt +++ b/compiler/testData/loadKotlin/prop/CollectionSize.kt @@ -1,6 +1,4 @@ package test -import java.util.Collection - val Collection<*>.anotherSize : Int get() = size() diff --git a/compiler/testData/loadKotlin/prop/CollectionSize.txt b/compiler/testData/loadKotlin/prop/CollectionSize.txt index 558def8cb64..05920c82011 100644 --- a/compiler/testData/loadKotlin/prop/CollectionSize.txt +++ b/compiler/testData/loadKotlin/prop/CollectionSize.txt @@ -1,3 +1,3 @@ namespace test -internal final val java.util.Collection.anotherSize: jet.Int +internal final val jet.Collection.anotherSize: jet.Int diff --git a/compiler/testData/loadKotlin/prop/ExtVarMapPQInt.kt b/compiler/testData/loadKotlin/prop/ExtVarMapPQInt.kt index 4abab48e497..a089ed4374a 100644 --- a/compiler/testData/loadKotlin/prop/ExtVarMapPQInt.kt +++ b/compiler/testData/loadKotlin/prop/ExtVarMapPQInt.kt @@ -1,7 +1,5 @@ package test -import java.util.Map - var Map.asas: Int get() = throw Exception() set(i: Int) = throw Exception() diff --git a/compiler/testData/loadKotlin/prop/ExtVarMapPQInt.txt b/compiler/testData/loadKotlin/prop/ExtVarMapPQInt.txt index 584a0bb69b8..d31b0f3a921 100644 --- a/compiler/testData/loadKotlin/prop/ExtVarMapPQInt.txt +++ b/compiler/testData/loadKotlin/prop/ExtVarMapPQInt.txt @@ -1,3 +1,3 @@ namespace test -internal final var java.util.Map.asas: jet.Int +internal final var jet.Map.asas: jet.Int diff --git a/compiler/testData/loadKotlin/type/ListOfAny.kt b/compiler/testData/loadKotlin/type/ListOfAny.kt index 74df70f27c7..a62be291f3a 100644 --- a/compiler/testData/loadKotlin/type/ListOfAny.kt +++ b/compiler/testData/loadKotlin/type/ListOfAny.kt @@ -1,5 +1,3 @@ package test -import java.util.List - fun listOfAny(): List = throw Exception() diff --git a/compiler/testData/loadKotlin/type/ListOfAny.txt b/compiler/testData/loadKotlin/type/ListOfAny.txt index 1bbd425153d..a779dc84060 100644 --- a/compiler/testData/loadKotlin/type/ListOfAny.txt +++ b/compiler/testData/loadKotlin/type/ListOfAny.txt @@ -1,3 +1,3 @@ namespace test -internal final fun listOfAny(): java.util.List +internal final fun listOfAny(): jet.List diff --git a/compiler/testData/loadKotlin/type/ListOfAnyQ.kt b/compiler/testData/loadKotlin/type/ListOfAnyQ.kt index 618cb4023d6..265c47dd651 100644 --- a/compiler/testData/loadKotlin/type/ListOfAnyQ.kt +++ b/compiler/testData/loadKotlin/type/ListOfAnyQ.kt @@ -1,5 +1,3 @@ package test -import java.util.List - fun listOfAnyQ(): List = throw Exception() diff --git a/compiler/testData/loadKotlin/type/ListOfAnyQ.txt b/compiler/testData/loadKotlin/type/ListOfAnyQ.txt index fd21244dc5e..f8f4b014144 100644 --- a/compiler/testData/loadKotlin/type/ListOfAnyQ.txt +++ b/compiler/testData/loadKotlin/type/ListOfAnyQ.txt @@ -1,3 +1,3 @@ namespace test -internal final fun listOfAnyQ(): java.util.List +internal final fun listOfAnyQ(): jet.List diff --git a/compiler/testData/loadKotlin/type/ListOfStar.kt b/compiler/testData/loadKotlin/type/ListOfStar.kt index 572fa54fff4..c4474bc1174 100644 --- a/compiler/testData/loadKotlin/type/ListOfStar.kt +++ b/compiler/testData/loadKotlin/type/ListOfStar.kt @@ -1,5 +1,3 @@ package test -import java.util.List - fun listOfStar(): List<*> = throw Exception() diff --git a/compiler/testData/loadKotlin/type/ListOfStar.txt b/compiler/testData/loadKotlin/type/ListOfStar.txt index c175944f2f7..aea0118211d 100644 --- a/compiler/testData/loadKotlin/type/ListOfStar.txt +++ b/compiler/testData/loadKotlin/type/ListOfStar.txt @@ -1,3 +1,3 @@ namespace test -internal final fun listOfStar(): java.util.List +internal final fun listOfStar(): jet.List diff --git a/compiler/testData/resolve/ResolveOfInfixExpressions.jet b/compiler/testData/resolve/ResolveOfInfixExpressions.jet index b250db32e22..37369a4a1ee 100644 --- a/compiler/testData/resolve/ResolveOfInfixExpressions.jet +++ b/compiler/testData/resolve/ResolveOfInfixExpressions.jet @@ -57,18 +57,18 @@ fun f_plus(): Int { } fun tt(t : T) : T { - val x : List = 0 - x`java::java.util.List.get()`[1] + val x : ArrayList = 0 + x`java::java.util.ArrayList.get()`[1] val foo = `Bar`Bar() foo`!!`[null, 1] foo`get2`[1, 1] foo`get1`[1] foo`set1`[1] = "" foo`set1`[1, 2] = "" - x`java::java.util.List.set()`[1] = null - (x`java::java.util.List.set()`[1]) = null - x`java::java.util.List.set()`[null] = null - (x`java::java.util.List.set()`[null, 2]) = null + x`java::java.util.ArrayList.set()`[1] = null + (x`java::java.util.ArrayList.set()`[1]) = null + x`java::java.util.ArrayList.set()`[null] = null + (x`java::java.util.ArrayList.set()`[null, 2]) = null (`not`!foo)[1]`:kotlin::Char` val y = Bar() y`inc`++ diff --git a/compiler/testData/resolve/ResolveToJava.jet b/compiler/testData/resolve/ResolveToJava.jet index 66f1b26670b..c1f9e0ad0d9 100644 --- a/compiler/testData/resolve/ResolveToJava.jet +++ b/compiler/testData/resolve/ResolveToJava.jet @@ -1,23 +1,23 @@ import `java::java`java.* import java.`java::java.util`util.* -fun foo(~a~a : `kotlin::Array`Array<`kotlin::Int`Int>) : `java::java.util.List`List { +fun foo(~a~a : `kotlin::Array`Array<`kotlin::Int`Int>) : `java::java.util.ArrayList`ArrayList { `a`a.`kotlin::Array.get(Int)`get(1) `a`a.`kotlin::Array.set(Int, Int)`set(1, 1) } -fun foo(o : `java::java.lang.Object`Object, l : `java::java.util`util.`java::java.util.List`List) : `java::java.util.List`List {} +fun foo(o : `java::java.lang.Object`Object, l : `java::java.util`util.`java::java.util.ArrayList`ArrayList) : `java::java.util.ArrayList`ArrayList {} ~A~class A() { - fun f(a : `java::java.util`util.`java::java.util.List`List) {} - fun f(a : `java::java.util.List`List) {} + fun f(a : `java::java.util`util.`java::java.util.ArrayList`ArrayList) {} + fun f(a : `java::java.util.ArrayList`ArrayList) {} } class B : `java::java.lang.Object`Object { - fun f(a : `java::java.util`util.`java::java.util.List`List) {} - fun f(a : `java::java.util.List`List) {} + fun f(a : `java::java.util`util.`java::java.util.ArrayList`ArrayList) {} + fun f(a : `java::java.util.ArrayList`ArrayList) {} ~foo~fun foo(abc : `A`A) : `A`A { diff --git a/compiler/tests/org/jetbrains/jet/codegen/NamespaceGenTest.java b/compiler/tests/org/jetbrains/jet/codegen/NamespaceGenTest.java index a23e9d9a4ab..1671d1d23f5 100644 --- a/compiler/tests/org/jetbrains/jet/codegen/NamespaceGenTest.java +++ b/compiler/tests/org/jetbrains/jet/codegen/NamespaceGenTest.java @@ -491,7 +491,7 @@ public class NamespaceGenTest extends CodegenTestCase { } public void testJavaInterfaceMethod() throws Exception { - loadText("import java.util.*; fun foo(l: List) { l.add(\"foo\") }"); + loadText("import java.util.*; fun foo(l: ArrayList) { l.add(\"foo\") }"); final Method main = generateFunction(); final ArrayList list = new ArrayList(); main.invoke(null, list); diff --git a/compiler/tests/org/jetbrains/jet/resolve/JetResolveTest.java b/compiler/tests/org/jetbrains/jet/resolve/JetResolveTest.java index 19a5588d485..432e174c3d3 100644 --- a/compiler/tests/org/jetbrains/jet/resolve/JetResolveTest.java +++ b/compiler/tests/org/jetbrains/jet/resolve/JetResolveTest.java @@ -82,10 +82,10 @@ public class JetResolveTest extends ExtensibleResolveTestCase { PsiClass java_util_Collections = findClass("java.util.Collections"); nameToDeclaration.put("java::java.util.Collections.emptyList()", findMethod(java_util_Collections, "emptyList")); nameToDeclaration.put("java::java.util.Collections", java_util_Collections); - PsiClass java_util_List = findClass("java.util.List"); - nameToDeclaration.put("java::java.util.List", java_util_List); - nameToDeclaration.put("java::java.util.List.set()", java_util_List.findMethodsByName("set", true)[0]); - nameToDeclaration.put("java::java.util.List.get()", java_util_List.findMethodsByName("get", true)[0]); + PsiClass java_util_List = findClass("java.util.ArrayList"); + nameToDeclaration.put("java::java.util.ArrayList", java_util_List); + nameToDeclaration.put("java::java.util.ArrayList.set()", java_util_List.findMethodsByName("set", true)[0]); + nameToDeclaration.put("java::java.util.ArrayList.get()", java_util_List.findMethodsByName("get", true)[0]); nameToDeclaration.put("java::java", findPackage("java")); nameToDeclaration.put("java::java.util", findPackage("java.util")); nameToDeclaration.put("java::java.lang", findPackage("java.lang")); diff --git a/idea/testData/checker/Builders.jet b/idea/testData/checker/Builders.jet index e8a87739916..3cabe31f8ec 100644 --- a/idea/testData/checker/Builders.jet +++ b/idea/testData/checker/Builders.jet @@ -78,7 +78,7 @@ import java.util.* } } - fun Map.set(key : String, value : String) = this.put(key, value) + fun MutableMap.set(key : String, value : String) = this.put(key, value) fun html(init : HTML.() -> Unit) : HTML { val html = HTML() diff --git a/idea/testData/checker/ResolveToJava.jet b/idea/testData/checker/ResolveToJava.jet index 63b6235011b..d2d123c658b 100644 --- a/idea/testData/checker/ResolveToJava.jet +++ b/idea/testData/checker/ResolveToJava.jet @@ -7,11 +7,11 @@ import java.lang.Comparable as Com val l : List = ArrayList() -fun test(l : java.util.List) { +fun test(l : List) { val x : java.List - val y : java.util.List + val y : List val b : java.lang.Object - val a : util.List + val a : util.List val z : java.utils.List val f : java.io.File? = null diff --git a/idea/testData/checker/regression/Jet53.jet b/idea/testData/checker/regression/Jet53.jet index e880fe25bbd..4bf62908dc0 100644 --- a/idea/testData/checker/regression/Jet53.jet +++ b/idea/testData/checker/regression/Jet53.jet @@ -1,4 +1,3 @@ import java.util.Collections -import java.util.List val ab = Collections.emptyList() : List? \ No newline at end of file diff --git a/idea/testData/codeInsight/overrideImplement/functionWithTypeParameters.kt b/idea/testData/codeInsight/overrideImplement/functionWithTypeParameters.kt index 699f1b7034a..5e7faae277f 100644 --- a/idea/testData/codeInsight/overrideImplement/functionWithTypeParameters.kt +++ b/idea/testData/codeInsight/overrideImplement/functionWithTypeParameters.kt @@ -1,5 +1,5 @@ trait Trait { - fun > foo() where B : Cloneable, B : Comparable; + fun > foo() where B : Cloneable, B : Comparable; } class TraitImpl : Trait { diff --git a/idea/testData/codeInsight/overrideImplement/functionWithTypeParameters.kt.after b/idea/testData/codeInsight/overrideImplement/functionWithTypeParameters.kt.after index 3a0b2bdb45e..29740cc170b 100644 Binary files a/idea/testData/codeInsight/overrideImplement/functionWithTypeParameters.kt.after and b/idea/testData/codeInsight/overrideImplement/functionWithTypeParameters.kt.after differ diff --git a/idea/testData/intentions/specifyType/afterClassNameClashing.kt b/idea/testData/intentions/specifyType/afterClassNameClashing.kt index 7694069290e..28531e416a7 100644 --- a/idea/testData/intentions/specifyType/afterClassNameClashing.kt +++ b/idea/testData/intentions/specifyType/afterClassNameClashing.kt @@ -1,7 +1,5 @@ // "Specify Type Explicitly" "true" -import java.util.Map - -fun getEntry() : java.util.Map.Entry, java.sql.Array> { +fun getEntry() : Map.Entry, java.sql.Array> { } val x: Map.Entry, java.sql.Array> = getEntry() \ No newline at end of file diff --git a/idea/testData/intentions/specifyType/afterLoopParameter.kt b/idea/testData/intentions/specifyType/afterLoopParameter.kt index d9a69e3f3c8..ee698f5c443 100644 --- a/idea/testData/intentions/specifyType/afterLoopParameter.kt +++ b/idea/testData/intentions/specifyType/afterLoopParameter.kt @@ -1,6 +1,5 @@ // "Specify Type Explicitly" "true" import java.util.HashMap -import java.util.Map fun foo(map : HashMap) { for (entry : Map.Entry in map.entrySet()) { diff --git a/idea/testData/intentions/specifyType/afterOnType.kt b/idea/testData/intentions/specifyType/afterOnType.kt index 06783fec0ae..0dfbb39978c 100644 --- a/idea/testData/intentions/specifyType/afterOnType.kt +++ b/idea/testData/intentions/specifyType/afterOnType.kt @@ -1,4 +1,3 @@ // "Remove Explicitly Specified Type" "true" -import java.util.Map val x = null \ No newline at end of file diff --git a/idea/testData/intentions/specifyType/beforeClassNameClashing.kt b/idea/testData/intentions/specifyType/beforeClassNameClashing.kt index ba06078de2f..9e01b5fddb8 100644 --- a/idea/testData/intentions/specifyType/beforeClassNameClashing.kt +++ b/idea/testData/intentions/specifyType/beforeClassNameClashing.kt @@ -1,5 +1,5 @@ // "Specify Type Explicitly" "true" -fun getEntry() : java.util.Map.Entry, java.sql.Array> { +fun getEntry() : Map.Entry, java.sql.Array> { } val x = getEntry() \ No newline at end of file diff --git a/idea/testData/intentions/specifyType/beforeOnType.kt b/idea/testData/intentions/specifyType/beforeOnType.kt index 16cd9c6c67b..c50c3b795df 100644 --- a/idea/testData/intentions/specifyType/beforeOnType.kt +++ b/idea/testData/intentions/specifyType/beforeOnType.kt @@ -1,4 +1,3 @@ // "Remove Explicitly Specified Type" "true" -import java.util.Map val x : Map.Entryng, Int>? = null \ No newline at end of file diff --git a/idea/testData/quickfix/typeAddition/afterPublicValWithoutReturnType.kt b/idea/testData/quickfix/typeAddition/afterPublicValWithoutReturnType.kt index cef70b9e1af..26a7212cbef 100644 --- a/idea/testData/quickfix/typeAddition/afterPublicValWithoutReturnType.kt +++ b/idea/testData/quickfix/typeAddition/afterPublicValWithoutReturnType.kt @@ -1,6 +1,4 @@ // "Specify type explicitly" "true" package a -import java.util.List - -public val l: List? = java.util.Collections.emptyList() \ No newline at end of file +public val l: MutableList? = java.util.Collections.emptyList() \ No newline at end of file diff --git a/idea/testData/quickfix/typeImports/afterHasThisImport.kt b/idea/testData/quickfix/typeImports/afterHasThisImport.kt index 19a3d943b90..1d7fe9b733a 100644 --- a/idea/testData/quickfix/typeImports/afterHasThisImport.kt +++ b/idea/testData/quickfix/typeImports/afterHasThisImport.kt @@ -9,7 +9,7 @@ import java.util.List class M { trait A { - val l: List? + val l: MutableList? } } } \ No newline at end of file diff --git a/idea/testData/quickfix/typeImports/afterToImport1.kt b/idea/testData/quickfix/typeImports/afterToImport1.kt index d98566c00c1..97493069390 100644 --- a/idea/testData/quickfix/typeImports/afterToImport1.kt +++ b/idea/testData/quickfix/typeImports/afterToImport1.kt @@ -2,10 +2,9 @@ package a import java.util.Collections -import java.util.List class M { trait A { - abstract val l: List? + abstract val l: MutableList? } } \ No newline at end of file