diff --git a/compiler/testData/loadJava/compiledJava/ArrayTypeVariance.txt b/compiler/testData/loadJava/compiledJava/ArrayTypeVariance.txt index b898af6ef42..f4f7754d760 100644 --- a/compiler/testData/loadJava/compiledJava/ArrayTypeVariance.txt +++ b/compiler/testData/loadJava/compiledJava/ArrayTypeVariance.txt @@ -2,5 +2,5 @@ package test public final class ArrayTypeVariance { public constructor ArrayTypeVariance() - public final fun toArray(/*0*/ p0: kotlin.Array?): kotlin.Array? + public final fun toArray(/*0*/ p0: kotlin.Array<(out) kotlin.Any!>!): kotlin.Array<(out) kotlin.Any!>! } diff --git a/compiler/testData/loadJava/compiledJava/ClassDoesNotOverrideMethod.txt b/compiler/testData/loadJava/compiledJava/ClassDoesNotOverrideMethod.txt index 11573442a97..70f617a4180 100644 --- a/compiler/testData/loadJava/compiledJava/ClassDoesNotOverrideMethod.txt +++ b/compiler/testData/loadJava/compiledJava/ClassDoesNotOverrideMethod.txt @@ -2,13 +2,13 @@ package test public abstract class ClassDoesNotOverrideMethod : java.util.Date { public constructor ClassDoesNotOverrideMethod() - invisible_fake final override /*1*/ /*fake_override*/ var cdate: sun.util.calendar.BaseCalendar.Date? + invisible_fake final override /*1*/ /*fake_override*/ var cdate: sun.util.calendar.BaseCalendar.Date! invisible_fake final override /*1*/ /*fake_override*/ var fastTime: kotlin.Long - public open override /*1*/ /*fake_override*/ fun after(/*0*/ p0: java.util.Date): kotlin.Boolean - public open override /*1*/ /*fake_override*/ fun before(/*0*/ p0: java.util.Date): kotlin.Boolean + public open override /*1*/ /*fake_override*/ fun after(/*0*/ p0: java.util.Date!): kotlin.Boolean + public open override /*1*/ /*fake_override*/ fun before(/*0*/ p0: java.util.Date!): kotlin.Boolean public open override /*1*/ /*fake_override*/ fun clone(): kotlin.Any - public open override /*1*/ /*fake_override*/ fun compareTo(/*0*/ other: java.util.Date): kotlin.Int - invisible_fake final override /*1*/ /*fake_override*/ fun getCalendarDate(): sun.util.calendar.BaseCalendar.Date? + public open override /*1*/ /*fake_override*/ fun compareTo(/*0*/ other: java.util.Date!): kotlin.Int + invisible_fake final override /*1*/ /*fake_override*/ fun getCalendarDate(): sun.util.calendar.BaseCalendar.Date! kotlin.deprecated(value = "Deprecated in Java": kotlin.String) public open override /*1*/ /*fake_override*/ fun getDate(): kotlin.Int kotlin.deprecated(value = "Deprecated in Java": kotlin.String) public open override /*1*/ /*fake_override*/ fun getDay(): kotlin.Int kotlin.deprecated(value = "Deprecated in Java": kotlin.String) public open override /*1*/ /*fake_override*/ fun getHours(): kotlin.Int @@ -19,9 +19,9 @@ public abstract class ClassDoesNotOverrideMethod : java.util.Date { invisible_fake final override /*1*/ /*fake_override*/ fun getTimeImpl(): kotlin.Long kotlin.deprecated(value = "Deprecated in Java": kotlin.String) public open override /*1*/ /*fake_override*/ fun getTimezoneOffset(): kotlin.Int kotlin.deprecated(value = "Deprecated in Java": kotlin.String) public open override /*1*/ /*fake_override*/ fun getYear(): kotlin.Int - invisible_fake final override /*1*/ /*fake_override*/ fun normalize(): sun.util.calendar.BaseCalendar.Date? - invisible_fake final override /*1*/ /*fake_override*/ fun normalize(/*0*/ p0: sun.util.calendar.BaseCalendar.Date?): sun.util.calendar.BaseCalendar.Date? - invisible_fake open override /*1*/ /*fake_override*/ fun readObject(/*0*/ p0: java.io.ObjectInputStream?): kotlin.Unit + invisible_fake final override /*1*/ /*fake_override*/ fun normalize(): sun.util.calendar.BaseCalendar.Date! + invisible_fake final override /*1*/ /*fake_override*/ fun normalize(/*0*/ p0: sun.util.calendar.BaseCalendar.Date!): sun.util.calendar.BaseCalendar.Date! + invisible_fake open override /*1*/ /*fake_override*/ fun readObject(/*0*/ p0: java.io.ObjectInputStream!): kotlin.Unit kotlin.deprecated(value = "Deprecated in Java": kotlin.String) public open override /*1*/ /*fake_override*/ fun setDate(/*0*/ p0: kotlin.Int): kotlin.Unit kotlin.deprecated(value = "Deprecated in Java": kotlin.String) public open override /*1*/ /*fake_override*/ fun setHours(/*0*/ p0: kotlin.Int): kotlin.Unit kotlin.deprecated(value = "Deprecated in Java": kotlin.String) public open override /*1*/ /*fake_override*/ fun setMinutes(/*0*/ p0: kotlin.Int): kotlin.Unit @@ -29,7 +29,7 @@ public abstract class ClassDoesNotOverrideMethod : java.util.Date { kotlin.deprecated(value = "Deprecated in Java": kotlin.String) public open override /*1*/ /*fake_override*/ fun setSeconds(/*0*/ p0: kotlin.Int): kotlin.Unit public open override /*1*/ /*fake_override*/ fun setTime(/*0*/ p0: kotlin.Long): kotlin.Unit kotlin.deprecated(value = "Deprecated in Java": kotlin.String) public open override /*1*/ /*fake_override*/ fun setYear(/*0*/ p0: kotlin.Int): kotlin.Unit - kotlin.deprecated(value = "Deprecated in Java": kotlin.String) public open override /*1*/ /*fake_override*/ fun toGMTString(): kotlin.String - kotlin.deprecated(value = "Deprecated in Java": kotlin.String) public open override /*1*/ /*fake_override*/ fun toLocaleString(): kotlin.String - invisible_fake open override /*1*/ /*fake_override*/ fun writeObject(/*0*/ p0: java.io.ObjectOutputStream?): kotlin.Unit + kotlin.deprecated(value = "Deprecated in Java": kotlin.String) public open override /*1*/ /*fake_override*/ fun toGMTString(): kotlin.String! + kotlin.deprecated(value = "Deprecated in Java": kotlin.String) public open override /*1*/ /*fake_override*/ fun toLocaleString(): kotlin.String! + invisible_fake open override /*1*/ /*fake_override*/ fun writeObject(/*0*/ p0: java.io.ObjectOutputStream!): kotlin.Unit } diff --git a/compiler/testData/loadJava/compiledJava/ClassWithTypePExtendsIterableP.txt b/compiler/testData/loadJava/compiledJava/ClassWithTypePExtendsIterableP.txt index e0c5ecb760f..aaf0c788b2a 100644 --- a/compiler/testData/loadJava/compiledJava/ClassWithTypePExtendsIterableP.txt +++ b/compiler/testData/loadJava/compiledJava/ClassWithTypePExtendsIterableP.txt @@ -1,6 +1,6 @@ package test -public abstract class ClassWithTypePExtendsIterableP : kotlin.MutableIterable

{ +public abstract class ClassWithTypePExtendsIterableP : kotlin.MutableIterable { public constructor ClassWithTypePExtendsIterableP() - public abstract override /*1*/ /*fake_override*/ fun iterator(): kotlin.MutableIterator

+ public abstract override /*1*/ /*fake_override*/ fun iterator(): kotlin.MutableIterator } diff --git a/compiler/testData/loadJava/compiledJava/ClassWithTypePP.txt b/compiler/testData/loadJava/compiledJava/ClassWithTypePP.txt index 33e6ddc2ff0..9921b69714e 100644 --- a/compiler/testData/loadJava/compiledJava/ClassWithTypePP.txt +++ b/compiler/testData/loadJava/compiledJava/ClassWithTypePP.txt @@ -1,5 +1,5 @@ package test -public final class ClassWithTypePP { - public constructor ClassWithTypePP() +public final class ClassWithTypePP { + public constructor ClassWithTypePP() } diff --git a/compiler/testData/loadJava/compiledJava/ClassWithTypePRefNext.txt b/compiler/testData/loadJava/compiledJava/ClassWithTypePRefNext.txt index e669b40ca24..c9c4b67e5bb 100644 --- a/compiler/testData/loadJava/compiledJava/ClassWithTypePRefNext.txt +++ b/compiler/testData/loadJava/compiledJava/ClassWithTypePRefNext.txt @@ -1,5 +1,5 @@ package test -public open class ClassWithTypePRefNext?, /*1*/ P> { - public constructor ClassWithTypePRefNext?, /*1*/ P>() +public open class ClassWithTypePRefNext!, /*1*/ P> { + public constructor ClassWithTypePRefNext!, /*1*/ P>() } diff --git a/compiler/testData/loadJava/compiledJava/ClassWithTypePRefSelf.txt b/compiler/testData/loadJava/compiledJava/ClassWithTypePRefSelf.txt index c67b604967c..aea8b50aeaf 100644 --- a/compiler/testData/loadJava/compiledJava/ClassWithTypePRefSelf.txt +++ b/compiler/testData/loadJava/compiledJava/ClassWithTypePRefSelf.txt @@ -1,5 +1,5 @@ package test -public final class ClassWithTypePRefSelf?> { - public constructor ClassWithTypePRefSelf?>() +public final class ClassWithTypePRefSelf!> { + public constructor ClassWithTypePRefSelf!>() } diff --git a/compiler/testData/loadJava/compiledJava/ClassWithTypePRefSelfAndClass.txt b/compiler/testData/loadJava/compiledJava/ClassWithTypePRefSelfAndClass.txt index dbf9c522d2b..7413374c60d 100644 --- a/compiler/testData/loadJava/compiledJava/ClassWithTypePRefSelfAndClass.txt +++ b/compiler/testData/loadJava/compiledJava/ClassWithTypePRefSelfAndClass.txt @@ -1,5 +1,5 @@ package test -public final class ClassWithTypePRefSelfAndClass?> { - public constructor ClassWithTypePRefSelfAndClass?>() +public final class ClassWithTypePRefSelfAndClass!> { + public constructor ClassWithTypePRefSelfAndClass!>() } diff --git a/compiler/testData/loadJava/compiledJava/FieldOfArrayType.txt b/compiler/testData/loadJava/compiledJava/FieldOfArrayType.txt index d7cf2d40ff7..567b838a6b3 100644 --- a/compiler/testData/loadJava/compiledJava/FieldOfArrayType.txt +++ b/compiler/testData/loadJava/compiledJava/FieldOfArrayType.txt @@ -2,5 +2,5 @@ package test public open class FieldOfArrayType { public constructor FieldOfArrayType() - public final var files: kotlin.Array? + public final var files: kotlin.Array<(out) java.io.File!>! } diff --git a/compiler/testData/loadJava/compiledJava/InheritMethodsDifferentReturnTypes.txt b/compiler/testData/loadJava/compiledJava/InheritMethodsDifferentReturnTypes.txt index da364eee10f..dcdd3a7083d 100644 --- a/compiler/testData/loadJava/compiledJava/InheritMethodsDifferentReturnTypes.txt +++ b/compiler/testData/loadJava/compiledJava/InheritMethodsDifferentReturnTypes.txt @@ -4,17 +4,17 @@ public final class InheritMethodsDifferentReturnTypes { public constructor InheritMethodsDifferentReturnTypes() public trait Sub : test.InheritMethodsDifferentReturnTypes.Super1, test.InheritMethodsDifferentReturnTypes.Super2 { - public abstract override /*2*/ /*fake_override*/ fun bar(): kotlin.String? - public abstract override /*2*/ /*fake_override*/ fun foo(): kotlin.String? + public abstract override /*2*/ /*fake_override*/ fun bar(): kotlin.String! + public abstract override /*2*/ /*fake_override*/ fun foo(): kotlin.String! } public trait Super1 { - public abstract fun bar(): kotlin.String? - public abstract fun foo(): kotlin.CharSequence? + public abstract fun bar(): kotlin.String! + public abstract fun foo(): kotlin.CharSequence! } public trait Super2 { - public abstract fun bar(): kotlin.CharSequence? - public abstract fun foo(): kotlin.String? + public abstract fun bar(): kotlin.CharSequence! + public abstract fun foo(): kotlin.String! } } diff --git a/compiler/testData/loadJava/compiledJava/InheritMethodsDifferentReturnTypesGeneric.txt b/compiler/testData/loadJava/compiledJava/InheritMethodsDifferentReturnTypesGeneric.txt index 25c075d6460..b7fa12bb112 100644 --- a/compiler/testData/loadJava/compiledJava/InheritMethodsDifferentReturnTypesGeneric.txt +++ b/compiler/testData/loadJava/compiledJava/InheritMethodsDifferentReturnTypesGeneric.txt @@ -3,18 +3,18 @@ package test public final class InheritMethodsDifferentReturnTypesGeneric { public constructor InheritMethodsDifferentReturnTypesGeneric() - public trait Sub : test.InheritMethodsDifferentReturnTypesGeneric.Super1, test.InheritMethodsDifferentReturnTypesGeneric.Super2 { - public abstract override /*2*/ /*fake_override*/ fun bar(): kotlin.String? - public abstract override /*2*/ /*fake_override*/ fun foo(): kotlin.String? + public trait Sub : test.InheritMethodsDifferentReturnTypesGeneric.Super1, test.InheritMethodsDifferentReturnTypesGeneric.Super2 { + public abstract override /*2*/ /*fake_override*/ fun bar(): kotlin.String! + public abstract override /*2*/ /*fake_override*/ fun foo(): kotlin.String! } public trait Super1 { - public abstract fun bar(): B? - public abstract fun foo(): F? + public abstract fun bar(): B! + public abstract fun foo(): F! } public trait Super2 { - public abstract fun bar(): BB? - public abstract fun foo(): FF? + public abstract fun bar(): BB! + public abstract fun foo(): FF! } } diff --git a/compiler/testData/loadJava/compiledJava/InnerClassesInGeneric.txt b/compiler/testData/loadJava/compiledJava/InnerClassesInGeneric.txt index 2f7fcc1e51b..a77fb7f3dc3 100644 --- a/compiler/testData/loadJava/compiledJava/InnerClassesInGeneric.txt +++ b/compiler/testData/loadJava/compiledJava/InnerClassesInGeneric.txt @@ -9,6 +9,6 @@ public open class InnerClassesInGeneric { public open inner class Inner2 : test.InnerClassesInGeneric.Inner { public constructor Inner2() - public open fun iterator(): kotlin.MutableIterator

? + public open fun iterator(): kotlin.(Mutable)Iterator! } } diff --git a/compiler/testData/loadJava/compiledJava/MethodReferencesOuterClassTP.txt b/compiler/testData/loadJava/compiledJava/MethodReferencesOuterClassTP.txt index 24fe42c95d0..9da1146ef5f 100644 --- a/compiler/testData/loadJava/compiledJava/MethodReferencesOuterClassTP.txt +++ b/compiler/testData/loadJava/compiledJava/MethodReferencesOuterClassTP.txt @@ -5,6 +5,6 @@ public final class MethodReferencesOuterClassTP { public final inner class Inner { public constructor Inner() - public final fun f(): kotlin.Unit + public final fun f(): kotlin.Unit } } diff --git a/compiler/testData/loadJava/compiledJava/MethodTypePOneUpperBound.txt b/compiler/testData/loadJava/compiledJava/MethodTypePOneUpperBound.txt index e60e910fb46..8ae76aa6322 100644 --- a/compiler/testData/loadJava/compiledJava/MethodTypePOneUpperBound.txt +++ b/compiler/testData/loadJava/compiledJava/MethodTypePOneUpperBound.txt @@ -2,5 +2,5 @@ package test public open class MethodTypePOneUpperBound { public constructor MethodTypePOneUpperBound() - public open fun bar(): kotlin.Unit + public open fun bar(): kotlin.Unit } diff --git a/compiler/testData/loadJava/compiledJava/MethodTypePTwoUpperBounds.txt b/compiler/testData/loadJava/compiledJava/MethodTypePTwoUpperBounds.txt index f17d46f2b20..cb0b79383e7 100644 --- a/compiler/testData/loadJava/compiledJava/MethodTypePTwoUpperBounds.txt +++ b/compiler/testData/loadJava/compiledJava/MethodTypePTwoUpperBounds.txt @@ -2,5 +2,5 @@ package test public open class MethodTypePTwoUpperBounds { public constructor MethodTypePTwoUpperBounds() - public open fun foo(): kotlin.Unit where T : java.lang.Runnable? + public open fun foo(): kotlin.Unit where T : java.lang.Runnable! } diff --git a/compiler/testData/loadJava/compiledJava/MethodWithTypePP.txt b/compiler/testData/loadJava/compiledJava/MethodWithTypePP.txt index 043d7ad44f5..3384c76e783 100644 --- a/compiler/testData/loadJava/compiledJava/MethodWithTypePP.txt +++ b/compiler/testData/loadJava/compiledJava/MethodWithTypePP.txt @@ -2,5 +2,5 @@ package test public final class MethodWithTypePP { public constructor MethodWithTypePP() - public final fun f(): kotlin.Unit + public final fun f(): kotlin.Unit } diff --git a/compiler/testData/loadJava/compiledJava/MethodWithTypePRefClassP.txt b/compiler/testData/loadJava/compiledJava/MethodWithTypePRefClassP.txt index a1f6e8b1888..3b0e3580d34 100644 --- a/compiler/testData/loadJava/compiledJava/MethodWithTypePRefClassP.txt +++ b/compiler/testData/loadJava/compiledJava/MethodWithTypePRefClassP.txt @@ -2,5 +2,5 @@ package test public open class MethodWithTypePRefClassP { public constructor MethodWithTypePRefClassP() - public final fun f(): kotlin.Unit + public final fun f(): kotlin.Unit } diff --git a/compiler/testData/loadJava/compiledJava/MethosWithPRefTP.txt b/compiler/testData/loadJava/compiledJava/MethosWithPRefTP.txt index 54e29bd7bc1..83de328230d 100644 --- a/compiler/testData/loadJava/compiledJava/MethosWithPRefTP.txt +++ b/compiler/testData/loadJava/compiledJava/MethosWithPRefTP.txt @@ -2,5 +2,5 @@ package test public final class MethosWithPRefTP { public constructor MethosWithPRefTP() - public final fun f(/*0*/ p0: P?): kotlin.Unit + public final fun f(/*0*/ p0: P!): kotlin.Unit } diff --git a/compiler/testData/loadJava/compiledJava/MyException.txt b/compiler/testData/loadJava/compiledJava/MyException.txt index 2eda281a3e4..67182826192 100644 --- a/compiler/testData/loadJava/compiledJava/MyException.txt +++ b/compiler/testData/loadJava/compiledJava/MyException.txt @@ -1,5 +1,5 @@ package test public open class MyException { - public constructor MyException(/*0*/ p0: kotlin.String?, /*1*/ p1: kotlin.Throwable?) + public constructor MyException(/*0*/ p0: kotlin.String!, /*1*/ p1: kotlin.Throwable!) } diff --git a/compiler/testData/loadJava/compiledJava/RawTypeWithUpperBound.txt b/compiler/testData/loadJava/compiledJava/RawTypeWithUpperBound.txt index acd5cc51586..4d9ac57ad7f 100644 --- a/compiler/testData/loadJava/compiledJava/RawTypeWithUpperBound.txt +++ b/compiler/testData/loadJava/compiledJava/RawTypeWithUpperBound.txt @@ -3,12 +3,12 @@ package test public trait RawTypeWithUpperBound { public trait Bar { - public abstract fun f(/*0*/ p0: test.RawTypeWithUpperBound.Foo?): kotlin.Unit + public abstract fun f(/*0*/ p0: test.RawTypeWithUpperBound.Foo!): kotlin.Unit } - - public trait Foo { + + public trait Foo { } // Static members - public final /*synthesized*/ fun Bar(/*0*/ function: (test.RawTypeWithUpperBound.Foo?) -> kotlin.Unit): test.RawTypeWithUpperBound.Bar + public /*synthesized*/ fun Bar(/*0*/ function: (test.RawTypeWithUpperBound.Foo!) -> kotlin.Unit): test.RawTypeWithUpperBound.Bar } diff --git a/compiler/testData/loadJava/compiledJava/RemoveRedundantProjectionKind.txt b/compiler/testData/loadJava/compiledJava/RemoveRedundantProjectionKind.txt index 781405bde80..dc7ef424f95 100644 --- a/compiler/testData/loadJava/compiledJava/RemoveRedundantProjectionKind.txt +++ b/compiler/testData/loadJava/compiledJava/RemoveRedundantProjectionKind.txt @@ -1,6 +1,6 @@ package test public trait RemoveRedundantProjectionKind { - public abstract fun f(/*0*/ p0: kotlin.Collection?): kotlin.Unit - public abstract fun f(/*0*/ p0: kotlin.Comparable?): kotlin.Unit + public abstract fun f(/*0*/ p0: (kotlin.MutableCollection..kotlin.Collection?)): kotlin.Unit + public abstract fun f(/*0*/ p0: kotlin.Comparable!): kotlin.Unit } diff --git a/compiler/testData/loadJava/compiledJava/UnboundWildcard.txt b/compiler/testData/loadJava/compiledJava/UnboundWildcard.txt index 78e27a08e43..94bd6583d3d 100644 --- a/compiler/testData/loadJava/compiledJava/UnboundWildcard.txt +++ b/compiler/testData/loadJava/compiledJava/UnboundWildcard.txt @@ -2,8 +2,8 @@ package test public final class UnboundWildcard { public constructor UnboundWildcard() - public final fun foo(): test.UnboundWildcard.MyClass? + public final fun foo(): test.UnboundWildcard.MyClass! - public trait MyClass { + public trait MyClass { } } diff --git a/compiler/testData/loadJava/compiledJava/constructor/ConstructorGenericDeep.txt b/compiler/testData/loadJava/compiledJava/constructor/ConstructorGenericDeep.txt index 69ed3a980f8..f5b0442f9dd 100644 --- a/compiler/testData/loadJava/compiledJava/constructor/ConstructorGenericDeep.txt +++ b/compiler/testData/loadJava/compiledJava/constructor/ConstructorGenericDeep.txt @@ -1,5 +1,5 @@ package test public open class ConstructorGenericDeep { - public constructor ConstructorGenericDeep(/*0*/ p0: java.lang.Class?) + public constructor ConstructorGenericDeep(/*0*/ p0: java.lang.Class!) } diff --git a/compiler/testData/loadJava/compiledJava/constructor/ConstructorGenericSimple.txt b/compiler/testData/loadJava/compiledJava/constructor/ConstructorGenericSimple.txt index 23fc47a52db..11b091671b0 100644 --- a/compiler/testData/loadJava/compiledJava/constructor/ConstructorGenericSimple.txt +++ b/compiler/testData/loadJava/compiledJava/constructor/ConstructorGenericSimple.txt @@ -1,5 +1,5 @@ package test public open class ConstructorGenericSimple { - public constructor ConstructorGenericSimple(/*0*/ p0: kotlin.Any?) + public constructor ConstructorGenericSimple(/*0*/ p0: kotlin.Any!) } diff --git a/compiler/testData/loadJava/compiledJava/constructor/ConstructorGenericUpperBound.txt b/compiler/testData/loadJava/compiledJava/constructor/ConstructorGenericUpperBound.txt index 11b0af66f1b..23ed8d349ce 100644 --- a/compiler/testData/loadJava/compiledJava/constructor/ConstructorGenericUpperBound.txt +++ b/compiler/testData/loadJava/compiledJava/constructor/ConstructorGenericUpperBound.txt @@ -1,5 +1,5 @@ package test public open class ConstructorGenericUpperBound { - public constructor ConstructorGenericUpperBound(/*0*/ p0: java.util.RandomAccess?) + public constructor ConstructorGenericUpperBound(/*0*/ p0: java.util.RandomAccess!) } diff --git a/compiler/testData/loadJava/compiledJava/javaBean/DifferentGetterAndSetter.txt b/compiler/testData/loadJava/compiledJava/javaBean/DifferentGetterAndSetter.txt index e570edbeaf4..c955510bae8 100644 --- a/compiler/testData/loadJava/compiledJava/javaBean/DifferentGetterAndSetter.txt +++ b/compiler/testData/loadJava/compiledJava/javaBean/DifferentGetterAndSetter.txt @@ -3,5 +3,5 @@ package test public open class DifferentGetterAndSetter { public constructor DifferentGetterAndSetter() public open fun getSomething(): kotlin.Int - public open fun setSomething(/*0*/ p0: kotlin.String?): kotlin.Unit + public open fun setSomething(/*0*/ p0: kotlin.String!): kotlin.Unit } diff --git a/compiler/testData/loadJava/compiledJava/javaBean/JavaBeanVal.txt b/compiler/testData/loadJava/compiledJava/javaBean/JavaBeanVal.txt index 81ec3ce6694..ab21612209b 100644 --- a/compiler/testData/loadJava/compiledJava/javaBean/JavaBeanVal.txt +++ b/compiler/testData/loadJava/compiledJava/javaBean/JavaBeanVal.txt @@ -2,5 +2,5 @@ package test public open class JavaBeanVal { public constructor JavaBeanVal() - public open fun getColor(): kotlin.String? + public open fun getColor(): kotlin.String! } diff --git a/compiler/testData/loadJava/compiledJava/javaBean/JavaBeanVar.txt b/compiler/testData/loadJava/compiledJava/javaBean/JavaBeanVar.txt index 814c9028cdf..10f4ef5f5d5 100644 --- a/compiler/testData/loadJava/compiledJava/javaBean/JavaBeanVar.txt +++ b/compiler/testData/loadJava/compiledJava/javaBean/JavaBeanVar.txt @@ -2,6 +2,6 @@ package test public open class JavaBeanVar { public constructor JavaBeanVar() - public open fun getColor(): kotlin.String? - public open fun setColor(/*0*/ p0: kotlin.String?): kotlin.Unit + public open fun getColor(): kotlin.String! + public open fun setColor(/*0*/ p0: kotlin.String!): kotlin.Unit } diff --git a/compiler/testData/loadJava/compiledJava/javaBean/JavaBeanVarOfGenericType.txt b/compiler/testData/loadJava/compiledJava/javaBean/JavaBeanVarOfGenericType.txt index 9ffd7cb5a7a..72cbd7fe749 100644 --- a/compiler/testData/loadJava/compiledJava/javaBean/JavaBeanVarOfGenericType.txt +++ b/compiler/testData/loadJava/compiledJava/javaBean/JavaBeanVarOfGenericType.txt @@ -2,6 +2,6 @@ package test public open class JavaBeanVarOfGenericType { public constructor JavaBeanVarOfGenericType() - public open fun getCharacters(): java.util.ArrayList

? - public open fun setCharacters(/*0*/ p0: java.util.ArrayList

?): kotlin.Unit + public open fun getCharacters(): java.util.ArrayList! + public open fun setCharacters(/*0*/ p0: java.util.ArrayList!): kotlin.Unit } diff --git a/compiler/testData/loadJava/compiledJava/javaBean/TwoSetters.txt b/compiler/testData/loadJava/compiledJava/javaBean/TwoSetters.txt index b8b2656d434..c71955f412f 100644 --- a/compiler/testData/loadJava/compiledJava/javaBean/TwoSetters.txt +++ b/compiler/testData/loadJava/compiledJava/javaBean/TwoSetters.txt @@ -3,5 +3,5 @@ package test public open class TwoSetters { public constructor TwoSetters() public open fun setSize(/*0*/ p0: kotlin.Int): kotlin.Unit - public open fun setSize(/*0*/ p0: kotlin.String?): kotlin.Unit + public open fun setSize(/*0*/ p0: kotlin.String!): kotlin.Unit } diff --git a/compiler/testData/loadJava/compiledJava/kotlinSignature/PropertySimpleType.txt b/compiler/testData/loadJava/compiledJava/kotlinSignature/PropertySimpleType.txt index 9d46a26b651..79fae74031c 100644 --- a/compiler/testData/loadJava/compiledJava/kotlinSignature/PropertySimpleType.txt +++ b/compiler/testData/loadJava/compiledJava/kotlinSignature/PropertySimpleType.txt @@ -3,5 +3,5 @@ package test public open class PropertySimpleType { public constructor PropertySimpleType() public final var fieldOne: kotlin.String - public final var fieldTwo: kotlin.String? + public final var fieldTwo: kotlin.String! } diff --git a/compiler/testData/loadJava/compiledJava/kotlinSignature/StarProjection.txt b/compiler/testData/loadJava/compiledJava/kotlinSignature/StarProjection.txt index bcc24db07f5..b42a62f2000 100644 --- a/compiler/testData/loadJava/compiledJava/kotlinSignature/StarProjection.txt +++ b/compiler/testData/loadJava/compiledJava/kotlinSignature/StarProjection.txt @@ -2,8 +2,8 @@ package test public final class StarProjection { public constructor StarProjection() - public final fun foo(): test.StarProjection.MyClass + public final fun foo(): test.StarProjection.MyClass - public trait MyClass { + public trait MyClass { } } diff --git a/compiler/testData/loadJava/compiledJava/kotlinSignature/error/ConflictingProjectionKind.txt b/compiler/testData/loadJava/compiledJava/kotlinSignature/error/ConflictingProjectionKind.txt index ab55ed672e6..04991e9d630 100644 --- a/compiler/testData/loadJava/compiledJava/kotlinSignature/error/ConflictingProjectionKind.txt +++ b/compiler/testData/loadJava/compiledJava/kotlinSignature/error/ConflictingProjectionKind.txt @@ -2,5 +2,5 @@ package test public open class ConflictingProjectionKind { public constructor ConflictingProjectionKind() - public open fun foo(/*0*/ p0: kotlin.List?): kotlin.Unit + public open fun foo(/*0*/ p0: kotlin.(Mutable)List!): kotlin.Unit } diff --git a/compiler/testData/loadJava/compiledJava/kotlinSignature/error/ExplicitFieldGettersAndSetters.txt b/compiler/testData/loadJava/compiledJava/kotlinSignature/error/ExplicitFieldGettersAndSetters.txt index b18fd0c8f41..307507b91ad 100644 --- a/compiler/testData/loadJava/compiledJava/kotlinSignature/error/ExplicitFieldGettersAndSetters.txt +++ b/compiler/testData/loadJava/compiledJava/kotlinSignature/error/ExplicitFieldGettersAndSetters.txt @@ -2,5 +2,5 @@ package test public open class ExplicitFieldGettersAndSetters { public constructor ExplicitFieldGettersAndSetters() - public final var foo: kotlin.String? + public final var foo: kotlin.String! } diff --git a/compiler/testData/loadJava/compiledJava/kotlinSignature/error/ExtraUpperBound.txt b/compiler/testData/loadJava/compiledJava/kotlinSignature/error/ExtraUpperBound.txt index ae09dbde2a8..1738562a3b1 100644 --- a/compiler/testData/loadJava/compiledJava/kotlinSignature/error/ExtraUpperBound.txt +++ b/compiler/testData/loadJava/compiledJava/kotlinSignature/error/ExtraUpperBound.txt @@ -2,5 +2,5 @@ package test public open class ExtraUpperBound { public constructor ExtraUpperBound() - public open fun foo(): kotlin.String? + public open fun foo(): kotlin.String! } diff --git a/compiler/testData/loadJava/compiledJava/kotlinSignature/error/MissingUpperBound.txt b/compiler/testData/loadJava/compiledJava/kotlinSignature/error/MissingUpperBound.txt index 989185d4f9e..d457bbae3ae 100644 --- a/compiler/testData/loadJava/compiledJava/kotlinSignature/error/MissingUpperBound.txt +++ b/compiler/testData/loadJava/compiledJava/kotlinSignature/error/MissingUpperBound.txt @@ -2,5 +2,5 @@ package test public open class MissingUpperBound { public constructor MissingUpperBound() - public open fun foo(): kotlin.String? where A : kotlin.Cloneable? + public open fun foo(): kotlin.String! where A : kotlin.Cloneable! } diff --git a/compiler/testData/loadJava/compiledJava/kotlinSignature/error/NoFieldTypeRef.txt b/compiler/testData/loadJava/compiledJava/kotlinSignature/error/NoFieldTypeRef.txt index b917eefb126..e508522b29b 100644 --- a/compiler/testData/loadJava/compiledJava/kotlinSignature/error/NoFieldTypeRef.txt +++ b/compiler/testData/loadJava/compiledJava/kotlinSignature/error/NoFieldTypeRef.txt @@ -2,5 +2,5 @@ package test public open class NoFieldTypeRef { public constructor NoFieldTypeRef() - public final var foo: kotlin.String? + public final var foo: kotlin.String! } diff --git a/compiler/testData/loadJava/compiledJava/kotlinSignature/error/NotVarargReplacedWithVararg.txt b/compiler/testData/loadJava/compiledJava/kotlinSignature/error/NotVarargReplacedWithVararg.txt index 58c68108883..484bf2caf43 100644 --- a/compiler/testData/loadJava/compiledJava/kotlinSignature/error/NotVarargReplacedWithVararg.txt +++ b/compiler/testData/loadJava/compiledJava/kotlinSignature/error/NotVarargReplacedWithVararg.txt @@ -2,5 +2,5 @@ package test public open class NotVarargReplacedWithVararg { public constructor NotVarargReplacedWithVararg() - public open fun foo(/*0*/ p0: kotlin.String?): kotlin.Unit + public open fun foo(/*0*/ p0: kotlin.String!): kotlin.Unit } diff --git a/compiler/testData/loadJava/compiledJava/kotlinSignature/error/ReturnTypeMissing.txt b/compiler/testData/loadJava/compiledJava/kotlinSignature/error/ReturnTypeMissing.txt index 97223540e62..53e99875ff9 100644 --- a/compiler/testData/loadJava/compiledJava/kotlinSignature/error/ReturnTypeMissing.txt +++ b/compiler/testData/loadJava/compiledJava/kotlinSignature/error/ReturnTypeMissing.txt @@ -2,5 +2,5 @@ package test public open class ReturnTypeMissing { public constructor ReturnTypeMissing() - public open fun foo(/*0*/ p0: kotlin.String?): kotlin.Int + public open fun foo(/*0*/ p0: kotlin.String!): kotlin.Int } diff --git a/compiler/testData/loadJava/compiledJava/kotlinSignature/error/SyntaxError.txt b/compiler/testData/loadJava/compiledJava/kotlinSignature/error/SyntaxError.txt index 7f2ac874c73..19684a70ead 100644 --- a/compiler/testData/loadJava/compiledJava/kotlinSignature/error/SyntaxError.txt +++ b/compiler/testData/loadJava/compiledJava/kotlinSignature/error/SyntaxError.txt @@ -2,5 +2,5 @@ package test public open class SyntaxError { public constructor SyntaxError() - public open fun foo(): kotlin.Int? + public open fun foo(): kotlin.Int! } diff --git a/compiler/testData/loadJava/compiledJava/kotlinSignature/error/SyntaxErrorInFieldAnnotation.txt b/compiler/testData/loadJava/compiledJava/kotlinSignature/error/SyntaxErrorInFieldAnnotation.txt index c0c29b3913e..525bb51a098 100644 --- a/compiler/testData/loadJava/compiledJava/kotlinSignature/error/SyntaxErrorInFieldAnnotation.txt +++ b/compiler/testData/loadJava/compiledJava/kotlinSignature/error/SyntaxErrorInFieldAnnotation.txt @@ -2,5 +2,5 @@ package test public open class SyntaxErrorInFieldAnnotation { public constructor SyntaxErrorInFieldAnnotation() - public final var foo: kotlin.String? + public final var foo: kotlin.String! } diff --git a/compiler/testData/loadJava/compiledJava/kotlinSignature/error/VarargReplacedWithNotVararg.txt b/compiler/testData/loadJava/compiledJava/kotlinSignature/error/VarargReplacedWithNotVararg.txt index 2557fbd3454..eed5132ac74 100644 --- a/compiler/testData/loadJava/compiledJava/kotlinSignature/error/VarargReplacedWithNotVararg.txt +++ b/compiler/testData/loadJava/compiledJava/kotlinSignature/error/VarargReplacedWithNotVararg.txt @@ -2,5 +2,5 @@ package test public open class VarargReplacedWithNotVararg { public constructor VarargReplacedWithNotVararg() - public open fun foo(/*0*/ vararg p0: kotlin.String? /*kotlin.Array*/): kotlin.Unit + public open fun foo(/*0*/ vararg p0: kotlin.String! /*kotlin.Array<(out) kotlin.String!>!*/): kotlin.Unit } diff --git a/compiler/testData/loadJava/compiledJava/kotlinSignature/error/WrongFieldInitializer.txt b/compiler/testData/loadJava/compiledJava/kotlinSignature/error/WrongFieldInitializer.txt index aa6e3977dfb..0b651101037 100644 --- a/compiler/testData/loadJava/compiledJava/kotlinSignature/error/WrongFieldInitializer.txt +++ b/compiler/testData/loadJava/compiledJava/kotlinSignature/error/WrongFieldInitializer.txt @@ -2,5 +2,5 @@ package test public open class WrongFieldInitializer { public constructor WrongFieldInitializer() - public final var foo: kotlin.String? + public final var foo: kotlin.String! } diff --git a/compiler/testData/loadJava/compiledJava/kotlinSignature/error/WrongFieldMutability.txt b/compiler/testData/loadJava/compiledJava/kotlinSignature/error/WrongFieldMutability.txt index 6308a3a4534..e724a36fbf2 100644 --- a/compiler/testData/loadJava/compiledJava/kotlinSignature/error/WrongFieldMutability.txt +++ b/compiler/testData/loadJava/compiledJava/kotlinSignature/error/WrongFieldMutability.txt @@ -2,6 +2,6 @@ package test public open class WrongFieldMutability { public constructor WrongFieldMutability() - public final val fooFinal: kotlin.String? = "Test" - public final var fooNotFinal: kotlin.String? + public final val fooFinal: kotlin.String! = "Test" + public final var fooNotFinal: kotlin.String! } diff --git a/compiler/testData/loadJava/compiledJava/kotlinSignature/error/WrongFieldName.txt b/compiler/testData/loadJava/compiledJava/kotlinSignature/error/WrongFieldName.txt index da8b62d7dc3..7e090f0f95b 100644 --- a/compiler/testData/loadJava/compiledJava/kotlinSignature/error/WrongFieldName.txt +++ b/compiler/testData/loadJava/compiledJava/kotlinSignature/error/WrongFieldName.txt @@ -2,5 +2,5 @@ package test public open class WrongFieldName { public constructor WrongFieldName() - public final var foo: kotlin.String? + public final var foo: kotlin.String! } diff --git a/compiler/testData/loadJava/compiledJava/kotlinSignature/error/WrongMethodName.txt b/compiler/testData/loadJava/compiledJava/kotlinSignature/error/WrongMethodName.txt index 8d45d70e303..937fed5961c 100644 --- a/compiler/testData/loadJava/compiledJava/kotlinSignature/error/WrongMethodName.txt +++ b/compiler/testData/loadJava/compiledJava/kotlinSignature/error/WrongMethodName.txt @@ -2,5 +2,5 @@ package test public open class WrongMethodName { public constructor WrongMethodName() - public open fun foo(): kotlin.String? + public open fun foo(): kotlin.String! } diff --git a/compiler/testData/loadJava/compiledJava/kotlinSignature/error/WrongTypeName1.txt b/compiler/testData/loadJava/compiledJava/kotlinSignature/error/WrongTypeName1.txt index 0089616c8d7..a6cda062bd5 100644 --- a/compiler/testData/loadJava/compiledJava/kotlinSignature/error/WrongTypeName1.txt +++ b/compiler/testData/loadJava/compiledJava/kotlinSignature/error/WrongTypeName1.txt @@ -2,5 +2,5 @@ package test public open class WrongTypeName1 { public constructor WrongTypeName1() - public open fun foo(/*0*/ p0: kotlin.String?): kotlin.String? + public open fun foo(/*0*/ p0: kotlin.String!): kotlin.String! } diff --git a/compiler/testData/loadJava/compiledJava/kotlinSignature/error/WrongTypeName2.txt b/compiler/testData/loadJava/compiledJava/kotlinSignature/error/WrongTypeName2.txt index d084bb8cc74..ae585048749 100644 --- a/compiler/testData/loadJava/compiledJava/kotlinSignature/error/WrongTypeName2.txt +++ b/compiler/testData/loadJava/compiledJava/kotlinSignature/error/WrongTypeName2.txt @@ -2,5 +2,5 @@ package test public open class WrongTypeName2 { public constructor WrongTypeName2() - public open fun foo(/*0*/ p0: kotlin.String?): kotlin.String? + public open fun foo(/*0*/ p0: kotlin.String!): kotlin.String! } diff --git a/compiler/testData/loadJava/compiledJava/kotlinSignature/error/WrongTypeName3.txt b/compiler/testData/loadJava/compiledJava/kotlinSignature/error/WrongTypeName3.txt index 10725cca5c3..0df001562cd 100644 --- a/compiler/testData/loadJava/compiledJava/kotlinSignature/error/WrongTypeName3.txt +++ b/compiler/testData/loadJava/compiledJava/kotlinSignature/error/WrongTypeName3.txt @@ -2,5 +2,5 @@ package test public open class WrongTypeName3 { public constructor WrongTypeName3() - public open fun foo(/*0*/ p0: kotlin.String?): kotlin.String? + public open fun foo(/*0*/ p0: kotlin.String!): kotlin.String! } diff --git a/compiler/testData/loadJava/compiledJava/kotlinSignature/error/WrongTypeParameterBoundStructure1.txt b/compiler/testData/loadJava/compiledJava/kotlinSignature/error/WrongTypeParameterBoundStructure1.txt index 6ebf0f583fa..15f49576d89 100644 --- a/compiler/testData/loadJava/compiledJava/kotlinSignature/error/WrongTypeParameterBoundStructure1.txt +++ b/compiler/testData/loadJava/compiledJava/kotlinSignature/error/WrongTypeParameterBoundStructure1.txt @@ -2,5 +2,5 @@ package test public open class WrongTypeParameterBoundStructure1 { public constructor WrongTypeParameterBoundStructure1() - public open fun foo(/*0*/ p0: A?, /*1*/ p1: kotlin.List?): kotlin.Unit where B : kotlin.List? + public open fun foo(/*0*/ p0: A!, /*1*/ p1: (kotlin.MutableList..kotlin.List?)): kotlin.Unit where B : kotlin.(Mutable)List! } diff --git a/compiler/testData/loadJava/compiledJava/kotlinSignature/error/WrongTypeParameterBoundStructure2.txt b/compiler/testData/loadJava/compiledJava/kotlinSignature/error/WrongTypeParameterBoundStructure2.txt index d4b9db26d72..094ec4615af 100644 --- a/compiler/testData/loadJava/compiledJava/kotlinSignature/error/WrongTypeParameterBoundStructure2.txt +++ b/compiler/testData/loadJava/compiledJava/kotlinSignature/error/WrongTypeParameterBoundStructure2.txt @@ -2,5 +2,5 @@ package test public open class WrongTypeParameterBoundStructure2 { public constructor WrongTypeParameterBoundStructure2() - public open fun foo(/*0*/ p0: A?, /*1*/ p1: kotlin.List?): kotlin.Unit where B : kotlin.List? + public open fun foo(/*0*/ p0: A!, /*1*/ p1: (kotlin.MutableList..kotlin.List?)): kotlin.Unit where B : kotlin.(Mutable)List! } diff --git a/compiler/testData/loadJava/compiledJava/kotlinSignature/error/WrongTypeParametersCount.txt b/compiler/testData/loadJava/compiledJava/kotlinSignature/error/WrongTypeParametersCount.txt index 43445a9c293..6bbe503b2bf 100644 --- a/compiler/testData/loadJava/compiledJava/kotlinSignature/error/WrongTypeParametersCount.txt +++ b/compiler/testData/loadJava/compiledJava/kotlinSignature/error/WrongTypeParametersCount.txt @@ -2,5 +2,5 @@ package test public open class WrongTypeParametersCount { public constructor WrongTypeParametersCount() - public open fun foo(/*0*/ p0: A?, /*1*/ p1: kotlin.List?): kotlin.Unit + public open fun foo(/*0*/ p0: A!, /*1*/ p1: (kotlin.MutableList..kotlin.List?)): kotlin.Unit } diff --git a/compiler/testData/loadJava/compiledJava/kotlinSignature/error/WrongValueParametersCount.txt b/compiler/testData/loadJava/compiledJava/kotlinSignature/error/WrongValueParametersCount.txt index 9bed085d6be..b4cde051a9c 100644 --- a/compiler/testData/loadJava/compiledJava/kotlinSignature/error/WrongValueParametersCount.txt +++ b/compiler/testData/loadJava/compiledJava/kotlinSignature/error/WrongValueParametersCount.txt @@ -2,5 +2,5 @@ package test public open class WrongValueParametersCount { public constructor WrongValueParametersCount() - public open fun foo(): kotlin.Int? + public open fun foo(): kotlin.Int! } diff --git a/compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/parameter/NotNullToNullable.txt b/compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/parameter/NotNullToNullable.txt index c91fe7f5f3c..46e25d17b32 100644 --- a/compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/parameter/NotNullToNullable.txt +++ b/compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/parameter/NotNullToNullable.txt @@ -4,11 +4,11 @@ public trait NotNullToNullable { public trait Sub : test.NotNullToNullable.Super { public abstract override /*1*/ /*fake_override*/ fun dummy(): kotlin.Unit - public abstract override /*1*/ fun foo(/*0*/ p0: kotlin.String): kotlin.Unit + public abstract override /*1*/ fun foo(/*0*/ p0: kotlin.String!): kotlin.Unit } public trait Super { public abstract fun dummy(): kotlin.Unit - public abstract fun foo(/*0*/ p0: kotlin.String): kotlin.Unit + public abstract fun foo(/*0*/ p0: kotlin.String!): kotlin.Unit } } diff --git a/compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/parameter/NullableToNotNull.txt b/compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/parameter/NullableToNotNull.txt index ade5f610b00..488f5a73737 100644 --- a/compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/parameter/NullableToNotNull.txt +++ b/compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/parameter/NullableToNotNull.txt @@ -4,11 +4,11 @@ public trait NullableToNotNull { public trait Sub : test.NullableToNotNull.Super { public abstract override /*1*/ /*fake_override*/ fun dummy(): kotlin.Unit - public abstract override /*1*/ fun foo(/*0*/ p0: kotlin.String?): kotlin.Unit + public abstract override /*1*/ fun foo(/*0*/ p0: kotlin.String!): kotlin.Unit } public trait Super { public abstract fun dummy(): kotlin.Unit - public abstract fun foo(/*0*/ p0: kotlin.String?): kotlin.Unit + public abstract fun foo(/*0*/ p0: kotlin.String!): kotlin.Unit } } diff --git a/compiler/testData/loadJava/compiledJava/sam/adapters/SeveralSamParameters.txt b/compiler/testData/loadJava/compiledJava/sam/adapters/SeveralSamParameters.txt index 1790c483c76..eb138e1c392 100644 --- a/compiler/testData/loadJava/compiledJava/sam/adapters/SeveralSamParameters.txt +++ b/compiler/testData/loadJava/compiledJava/sam/adapters/SeveralSamParameters.txt @@ -4,6 +4,6 @@ public open class SeveralSamParameters { public constructor SeveralSamParameters() // Static members - public /*synthesized*/ fun findMaxAndInvokeCallback(/*0*/ p0: ((kotlin.String, kotlin.String) -> kotlin.Int)?, /*1*/ p1: kotlin.String?, /*2*/ p2: kotlin.String?, /*3*/ p3: (() -> kotlin.Unit)?): kotlin.String? + public /*synthesized*/ fun findMaxAndInvokeCallback(/*0*/ p0: ((kotlin.String!, kotlin.String!) -> kotlin.Int)!, /*1*/ p1: kotlin.String!, /*2*/ p2: kotlin.String!, /*3*/ p3: (() -> kotlin.Unit)!): kotlin.String! public open fun findMaxAndInvokeCallback(/*0*/ p0: java.util.Comparator!, /*1*/ p1: kotlin.String!, /*2*/ p2: kotlin.String!, /*3*/ p3: java.lang.Runnable!): kotlin.String! } diff --git a/compiler/testData/loadJava/compiledJava/sam/adapters/TypeParameterOfClass.txt b/compiler/testData/loadJava/compiledJava/sam/adapters/TypeParameterOfClass.txt index 4792c797fc5..41b399cb364 100644 --- a/compiler/testData/loadJava/compiledJava/sam/adapters/TypeParameterOfClass.txt +++ b/compiler/testData/loadJava/compiledJava/sam/adapters/TypeParameterOfClass.txt @@ -2,6 +2,6 @@ package test public open class TypeParameterOfClass { public constructor TypeParameterOfClass() - public final /*synthesized*/ fun foo(/*0*/ p0: ((T, T) -> kotlin.Int)?): kotlin.Unit + public final /*synthesized*/ fun foo(/*0*/ p0: ((T!, T!) -> kotlin.Int)!): kotlin.Unit public open fun foo(/*0*/ p0: java.util.Comparator!): kotlin.Unit } diff --git a/compiler/testData/loadJava/compiledJava/sam/adapters/TypeParameterOfMethod.txt b/compiler/testData/loadJava/compiledJava/sam/adapters/TypeParameterOfMethod.txt index 831ba5eebb9..c5700bab832 100644 --- a/compiler/testData/loadJava/compiledJava/sam/adapters/TypeParameterOfMethod.txt +++ b/compiler/testData/loadJava/compiledJava/sam/adapters/TypeParameterOfMethod.txt @@ -4,10 +4,10 @@ public open class TypeParameterOfMethod { public constructor TypeParameterOfMethod() // Static members - public /*synthesized*/ fun max(/*0*/ p0: ((T, T) -> kotlin.Int)?, /*1*/ p1: T?, /*2*/ p2: T?): T? + public /*synthesized*/ fun max(/*0*/ p0: ((T!, T!) -> kotlin.Int)!, /*1*/ p1: T!, /*2*/ p2: T!): T! public open fun max(/*0*/ p0: java.util.Comparator!, /*1*/ p1: T!, /*2*/ p2: T!): T! - public /*synthesized*/ fun max2(/*0*/ p0: ((T, T) -> kotlin.Int)?, /*1*/ p1: T?, /*2*/ p2: T?): T? + public /*synthesized*/ fun max2(/*0*/ p0: ((T!, T!) -> kotlin.Int)!, /*1*/ p1: T!, /*2*/ p2: T!): T! public open fun max2(/*0*/ p0: java.util.Comparator!, /*1*/ p1: T!, /*2*/ p2: T!): T! - public /*synthesized*/ fun ?> method(/*0*/ p0: ((A, A) -> kotlin.Int)?, /*1*/ p1: B?): kotlin.Unit + public /*synthesized*/ fun !> method(/*0*/ p0: ((A!, A!) -> kotlin.Int)!, /*1*/ p1: B!): kotlin.Unit public open fun !> method(/*0*/ p0: java.util.Comparator!, /*1*/ p1: B!): kotlin.Unit } diff --git a/compiler/testData/loadJava/compiledJava/sam/adapters/TypeParameterOfOuterClass.txt b/compiler/testData/loadJava/compiledJava/sam/adapters/TypeParameterOfOuterClass.txt index 872f960dac0..2cc5708f804 100644 --- a/compiler/testData/loadJava/compiledJava/sam/adapters/TypeParameterOfOuterClass.txt +++ b/compiler/testData/loadJava/compiledJava/sam/adapters/TypeParameterOfOuterClass.txt @@ -5,7 +5,7 @@ public open class TypeParameterOfOuterClass { public open inner class Inner { public constructor Inner() - public final /*synthesized*/ fun foo(/*0*/ p0: ((T, T) -> kotlin.Int)?): kotlin.Unit + public final /*synthesized*/ fun foo(/*0*/ p0: ((T!, T!) -> kotlin.Int)!): kotlin.Unit public open fun foo(/*0*/ p0: java.util.Comparator!): kotlin.Unit } } diff --git a/compiler/testData/loadJava/compiledJava/sam/adapters/inheritance/InheritedSameAdaptersWithSubstitution.txt b/compiler/testData/loadJava/compiledJava/sam/adapters/inheritance/InheritedSameAdaptersWithSubstitution.txt index f4e30d5a396..fc889678c52 100644 --- a/compiler/testData/loadJava/compiledJava/sam/adapters/inheritance/InheritedSameAdaptersWithSubstitution.txt +++ b/compiler/testData/loadJava/compiledJava/sam/adapters/inheritance/InheritedSameAdaptersWithSubstitution.txt @@ -3,28 +3,28 @@ package test public trait InheritedSameAdaptersWithSubstitution { public trait Sub : test.InheritedSameAdaptersWithSubstitution.Super1, test.InheritedSameAdaptersWithSubstitution.Super2Substituted { - public final override /*2*/ /*fake_override*/ fun foo(/*0*/ p0: ((kotlin.String, kotlin.String) -> kotlin.Int)?): kotlin.Unit - public abstract override /*2*/ /*fake_override*/ fun foo(/*0*/ p0: java.util.Comparator?): kotlin.Unit + public final override /*2*/ /*fake_override*/ fun foo(/*0*/ p0: ((kotlin.String!, kotlin.String!) -> kotlin.Int)!): kotlin.Unit + public abstract override /*2*/ /*fake_override*/ fun foo(/*0*/ p0: java.util.Comparator!): kotlin.Unit } public trait Super1 { - public final /*synthesized*/ fun foo(/*0*/ p0: ((kotlin.String, kotlin.String) -> kotlin.Int)?): kotlin.Unit - public abstract fun foo(/*0*/ p0: java.util.Comparator?): kotlin.Unit + public final /*synthesized*/ fun foo(/*0*/ p0: ((kotlin.String!, kotlin.String!) -> kotlin.Int)!): kotlin.Unit + public abstract fun foo(/*0*/ p0: java.util.Comparator!): kotlin.Unit } public trait Super2 { - public final /*synthesized*/ fun foo(/*0*/ p0: ((T, T) -> kotlin.Int)?): kotlin.Unit - public abstract fun foo(/*0*/ p0: java.util.Comparator?): kotlin.Unit + public final /*synthesized*/ fun foo(/*0*/ p0: ((T!, T!) -> kotlin.Int)!): kotlin.Unit + public abstract fun foo(/*0*/ p0: java.util.Comparator!): kotlin.Unit } - - public trait Super2Substituted : test.InheritedSameAdaptersWithSubstitution.Super2 { - public final override /*1*/ /*fake_override*/ fun foo(/*0*/ p0: ((kotlin.String, kotlin.String) -> kotlin.Int)?): kotlin.Unit - public abstract override /*1*/ /*fake_override*/ fun foo(/*0*/ p0: java.util.Comparator?): kotlin.Unit + + public trait Super2Substituted : test.InheritedSameAdaptersWithSubstitution.Super2 { + public final override /*1*/ /*fake_override*/ fun foo(/*0*/ p0: ((kotlin.String!, kotlin.String!) -> kotlin.Int)!): kotlin.Unit + public abstract override /*1*/ /*fake_override*/ fun foo(/*0*/ p0: java.util.Comparator!): kotlin.Unit } // Static members - public final /*synthesized*/ fun Sub(/*0*/ function: (java.util.Comparator?) -> kotlin.Unit): test.InheritedSameAdaptersWithSubstitution.Sub - public final /*synthesized*/ fun Super1(/*0*/ function: (java.util.Comparator?) -> kotlin.Unit): test.InheritedSameAdaptersWithSubstitution.Super1 - public final /*synthesized*/ fun Super2(/*0*/ function: (java.util.Comparator?) -> kotlin.Unit): test.InheritedSameAdaptersWithSubstitution.Super2 - public final /*synthesized*/ fun Super2Substituted(/*0*/ function: (java.util.Comparator?) -> kotlin.Unit): test.InheritedSameAdaptersWithSubstitution.Super2Substituted + public /*synthesized*/ fun Sub(/*0*/ function: (java.util.Comparator!) -> kotlin.Unit): test.InheritedSameAdaptersWithSubstitution.Sub + public /*synthesized*/ fun Super1(/*0*/ function: (java.util.Comparator!) -> kotlin.Unit): test.InheritedSameAdaptersWithSubstitution.Super1 + public /*synthesized*/ fun Super2(/*0*/ function: (java.util.Comparator!) -> kotlin.Unit): test.InheritedSameAdaptersWithSubstitution.Super2 + public /*synthesized*/ fun Super2Substituted(/*0*/ function: (java.util.Comparator!) -> kotlin.Unit): test.InheritedSameAdaptersWithSubstitution.Super2Substituted } diff --git a/core/descriptor.loader.java/src/org/jetbrains/jet/lang/resolve/java/lazy/types/LazyJavaTypeResolver.kt b/core/descriptor.loader.java/src/org/jetbrains/jet/lang/resolve/java/lazy/types/LazyJavaTypeResolver.kt index a637f27722a..e3b90dd87ba 100644 --- a/core/descriptor.loader.java/src/org/jetbrains/jet/lang/resolve/java/lazy/types/LazyJavaTypeResolver.kt +++ b/core/descriptor.loader.java/src/org/jetbrains/jet/lang/resolve/java/lazy/types/LazyJavaTypeResolver.kt @@ -45,7 +45,7 @@ class LazyJavaTypeResolver( val canonicalText = javaType.getCanonicalText() val jetType = JavaToKotlinClassMap.getInstance().mapPrimitiveKotlinClass(canonicalText) assert(jetType != null, "Primitive type is not found: " + canonicalText) - return jetType!! + jetType!! } is JavaClassifierType -> if (PLATFORM_TYPES && attr.allowFlexible && attr.howThisTypeIsUsed != SUPERTYPE) LazyFlexibleJavaClassifierType(javaType, attr) @@ -271,7 +271,20 @@ class LazyJavaTypeResolver( ) : DelegatingFlexibleType( LazyJavaClassifierType(javaType, attr.toFlexible(FLEXIBLE_LOWER_BOUND)), LazyJavaClassifierType(javaType, attr.toFlexible(FLEXIBLE_UPPER_BOUND)) - ) + ), CustomTypeVariable { + + override val isTypeVariable: Boolean = lowerBound.getConstructor() == upperBound.getConstructor() + && lowerBound.getConstructor().getDeclarationDescriptor() is TypeParameterDescriptor + + override val typeParameterDescriptor: TypeParameterDescriptor? = if (isTypeVariable) lowerBound.getConstructor().getDeclarationDescriptor() as TypeParameterDescriptor else null + + override fun substitutionResult(replacement: JetType): JetType { + return if (replacement.isFlexible()) replacement + else DelegatingFlexibleType(TypeUtils.makeNotNullable(replacement), TypeUtils.makeNullable(replacement)) + } + } + + private class JavaTypeVariable() } trait JavaTypeAttributes { diff --git a/core/descriptors/src/org/jetbrains/jet/lang/types/CustomTypeVariable.kt b/core/descriptors/src/org/jetbrains/jet/lang/types/CustomTypeVariable.kt new file mode 100644 index 00000000000..3653fc4ff94 --- /dev/null +++ b/core/descriptors/src/org/jetbrains/jet/lang/types/CustomTypeVariable.kt @@ -0,0 +1,35 @@ +/* + * Copyright 2010-2014 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.jetbrains.jet.lang.types + +import org.jetbrains.jet.lang.descriptors.TypeParameterDescriptor + +// To facilitate laziness, any JetType implementation may inherit from this trait, +// even if it turns out that the type an instance represents is not actually a type variable +// (i.e. it is not derived from a type parameter), see isTypeVariable +public trait CustomTypeVariable : JetType { + val isTypeVariable: Boolean + + // If typeParameterDescriptor != null <=> isTypeVariable == true, this is not a type variable + val typeParameterDescriptor: TypeParameterDescriptor? + + + // Throws an exception when isTypeVariable == false + fun substitutionResult(replacement: JetType): JetType +} + +fun JetType.isCustomTypeVariable() = (this as? CustomTypeVariable)?.isTypeVariable ?: false \ No newline at end of file diff --git a/core/descriptors/src/org/jetbrains/jet/lang/types/TypeSubstitutor.java b/core/descriptors/src/org/jetbrains/jet/lang/types/TypeSubstitutor.java index a68baa3a6b1..3cdfc107673 100644 --- a/core/descriptors/src/org/jetbrains/jet/lang/types/TypeSubstitutor.java +++ b/core/descriptors/src/org/jetbrains/jet/lang/types/TypeSubstitutor.java @@ -155,7 +155,7 @@ public class TypeSubstitutor { // The type is within the substitution range, i.e. T or T? JetType type = originalProjection.getType(); Variance originalProjectionKind = originalProjection.getProjectionKind(); - if (type instanceof FlexibleType) { + if (type instanceof FlexibleType && !TypesPackage.isCustomTypeVariable(type)) { FlexibleType flexibleType = (FlexibleType) type; TypeProjection substitutedLower = unsafeSubstitute(new TypeProjectionImpl(originalProjectionKind, flexibleType.getLowerBound()), recursionDepth + 1); @@ -185,10 +185,17 @@ public class TypeSubstitutor { //noinspection ConstantConditions return TypeUtils.makeStarProjection(typeParameter); case NO_CONFLICT: - boolean resultingIsNullable = type.isNullable() || replacement.getType().isNullable(); - JetType substitutedType = TypeUtils.makeNullableAsSpecified(replacement.getType(), resultingIsNullable); - Variance resultingProjectionKind = combine(originalProjectionKind, replacement.getProjectionKind()); + JetType substitutedType; + if (TypesPackage.isCustomTypeVariable(type)) { + CustomTypeVariable typeVariable = (CustomTypeVariable) type; + substitutedType = typeVariable.substitutionResult(replacement.getType()); + } + else { + boolean resultingIsNullable = type.isNullable() || replacement.getType().isNullable(); + substitutedType = TypeUtils.makeNullableAsSpecified(replacement.getType(), resultingIsNullable); + } + Variance resultingProjectionKind = combine(originalProjectionKind, replacement.getProjectionKind()); return new TypeProjectionImpl(resultingProjectionKind, substitutedType); default: throw new IllegalStateException(); diff --git a/core/descriptors/src/org/jetbrains/jet/lang/types/flexibleTypes.kt b/core/descriptors/src/org/jetbrains/jet/lang/types/flexibleTypes.kt index eaaefebb9c5..1d3b221532a 100644 --- a/core/descriptors/src/org/jetbrains/jet/lang/types/flexibleTypes.kt +++ b/core/descriptors/src/org/jetbrains/jet/lang/types/flexibleTypes.kt @@ -30,6 +30,11 @@ public open class DelegatingFlexibleType( override val upperBound: JetType ) : DelegatingType(), FlexibleType { + { + assert (!lowerBound.isFlexible()) { "Lower bound of a flexible type can not be flexible: $lowerBound" } + assert (!upperBound.isFlexible()) { "Upper bound of a flexible type can not be flexible: $upperBound" } + } + override fun getDelegate() = lowerBound override fun toString() = "('$lowerBound'..'$upperBound')"