diff --git a/compiler/testData/cfg/controlStructures/whenConditions.values b/compiler/testData/cfg/controlStructures/whenConditions.values index 9dc67202b46..6673e68682e 100644 --- a/compiler/testData/cfg/controlStructures/whenConditions.values +++ b/compiler/testData/cfg/controlStructures/whenConditions.values @@ -10,25 +10,25 @@ fun foo(a: Number) { } } --------------------- - : {<: Number} NEW: magic[FAKE_INITIALIZER](a: Number) -> -a : * NEW: r(a) -> -1 : * NEW: r(1) -> -1 : * NEW: magic[EQUALS_IN_WHEN_CONDITION](1|, ) -> -"1" : {<: String?} NEW: r("1") -> -2 : {<: Int?} NEW: r(2) -> -singleton(2) : OR{{<: Collection}, {<: Collection}} NEW: call(singleton(2), singleton|) -> -Collections.singleton(2) : OR{{<: Collection}, {<: Collection}} COPY -in Collections.singleton(2) : * NEW: call(in Collections.singleton(2), contains|, ) -> -"2" : {<: String?} NEW: r("2") -> -is Int : * NEW: magic[IS](is Int|) -> -"Int" : {<: String?} NEW: r("Int") -> -3 : {<: Int?} NEW: r(3) -> -singleton(3) : OR{{<: Collection}, {<: Collection}} NEW: call(singleton(3), singleton|) -> -Collections.singleton(3) : OR{{<: Collection}, {<: Collection}} COPY -!in Collections.singleton(3) : * NEW: call(!in Collections.singleton(3), contains|, ) -> -"!3" : {<: String?} NEW: r("!3") -> -!is Number : * NEW: magic[IS](!is Number|) -> -"!Number" : {<: String?} NEW: r("!Number") -> -null : {<: String?} NEW: r(null) -> -when (a) { 1 -> "1" in Collections.singleton(2) -> "2" is Int -> "Int" !in Collections.singleton(3) -> "!3" !is Number -> "!Number" else -> null } : {<: String?} NEW: merge(when (a) { 1 -> "1" in Collections.singleton(2) -> "2" is Int -> "Int" !in Collections.singleton(3) -> "!3" !is Number -> "!Number" else -> null }|, , , , , ) -> + : {<: Number} NEW: magic[FAKE_INITIALIZER](a: Number) -> +a : * NEW: r(a) -> +1 : * NEW: r(1) -> +1 : * NEW: magic[EQUALS_IN_WHEN_CONDITION](1|, ) -> +"1" : {<: String?} NEW: r("1") -> +2 : Int! NEW: r(2) -> +singleton(2) : OR{{<: Collection}, {<: Collection}} NEW: call(singleton(2), singleton|) -> +Collections.singleton(2) : OR{{<: Collection}, {<: Collection}} COPY +in Collections.singleton(2) : * NEW: call(in Collections.singleton(2), contains|, ) -> +"2" : {<: String?} NEW: r("2") -> +is Int : * NEW: magic[IS](is Int|) -> +"Int" : {<: String?} NEW: r("Int") -> +3 : Int! NEW: r(3) -> +singleton(3) : OR{{<: Collection}, {<: Collection}} NEW: call(singleton(3), singleton|) -> +Collections.singleton(3) : OR{{<: Collection}, {<: Collection}} COPY +!in Collections.singleton(3) : * NEW: call(!in Collections.singleton(3), contains|, ) -> +"!3" : {<: String?} NEW: r("!3") -> +!is Number : * NEW: magic[IS](!is Number|) -> +"!Number" : {<: String?} NEW: r("!Number") -> +null : {<: String?} NEW: r(null) -> +when (a) { 1 -> "1" in Collections.singleton(2) -> "2" is Int -> "Int" !in Collections.singleton(3) -> "!3" !is Number -> "!Number" else -> null } : {<: String?} NEW: merge(when (a) { 1 -> "1" in Collections.singleton(2) -> "2" is Int -> "Int" !in Collections.singleton(3) -> "!3" !is Number -> "!Number" else -> null }|, , , , , ) -> ===================== diff --git a/compiler/testData/diagnostics/tests/Builders.kt b/compiler/testData/diagnostics/tests/Builders.kt index 78127c0a6d0..d2a0fa788b6 100644 --- a/compiler/testData/diagnostics/tests/Builders.kt +++ b/compiler/testData/diagnostics/tests/Builders.kt @@ -135,7 +135,7 @@ class A() : BodyTag("a") { get() = attributes["href"] set(value) { if (value != null) { - attributes.put("href", value) + attributes.put("href", value) // attributes["href"] = value //doesn't work: KT-1355 } } diff --git a/compiler/testData/diagnostics/tests/duplicateJvmSignature/accidentalOverrides/phantomClashWithSamAdapter.kt b/compiler/testData/diagnostics/tests/duplicateJvmSignature/accidentalOverrides/phantomClashWithSamAdapter.kt index 18fc072e7d6..b47b41b1d6c 100644 --- a/compiler/testData/diagnostics/tests/duplicateJvmSignature/accidentalOverrides/phantomClashWithSamAdapter.kt +++ b/compiler/testData/diagnostics/tests/duplicateJvmSignature/accidentalOverrides/phantomClashWithSamAdapter.kt @@ -23,5 +23,6 @@ import p.* open class K0 : Foo() class K : K0() { - fun foo(f: () -> Unit) {} + // We keep this test to make sure ACCIDENTAL_OVERRIDE is not reported + fun foo(f: () -> Unit) {} } diff --git a/compiler/testData/diagnostics/tests/j+k/SupertypeArgumentsNullability-UserTypes.kt b/compiler/testData/diagnostics/tests/j+k/SupertypeArgumentsNullability-UserTypes.kt index 302ed529f1f..cc28efdcaa2 100644 --- a/compiler/testData/diagnostics/tests/j+k/SupertypeArgumentsNullability-UserTypes.kt +++ b/compiler/testData/diagnostics/tests/j+k/SupertypeArgumentsNullability-UserTypes.kt @@ -15,6 +15,6 @@ public class Y extends X { // FILE: test.kt fun main() { - Y().foo().hashCode() + Y().foo().hashCode() Y().bar(null) } diff --git a/compiler/testData/diagnostics/tests/jdk-annotations/sql/DriverManager.kt b/compiler/testData/diagnostics/tests/jdk-annotations/sql/DriverManager.kt index 8a4c17cca73..f6caf2a1b6a 100644 --- a/compiler/testData/diagnostics/tests/jdk-annotations/sql/DriverManager.kt +++ b/compiler/testData/diagnostics/tests/jdk-annotations/sql/DriverManager.kt @@ -1,29 +1,29 @@ import java.sql.DriverManager fun getConnection(url: String?) { - DriverManager.getConnection(url) + DriverManager.getConnection(url) DriverManager.getConnection(url!!) : java.sql.Connection } fun getConnection(url: String?, props: java.util.Properties?) { - DriverManager.getConnection(url, props) + DriverManager.getConnection(url, props) DriverManager.getConnection(url!!, props) : java.sql.Connection } fun getConnection(url: String?, user: String?, password: String?) { - DriverManager.getConnection(url, user!!, password!!) - DriverManager.getConnection(url!!, user, password!!) - DriverManager.getConnection(url!!, user!!, password) - DriverManager.getConnection(url!!, user!!, password!!) : java.sql.Connection + DriverManager.getConnection(url, user!!, password!!) + DriverManager.getConnection(url!!, user, password!!) + DriverManager.getConnection(url!!, user!!, password) + DriverManager.getConnection(url!!, user!!, password!!) : java.sql.Connection } fun getDriver(url: String?) { - DriverManager.getDriver(url) + DriverManager.getDriver(url) DriverManager.getDriver(url!!) : java.sql.Driver } fun registerDriver(driver: java.sql.Driver?) { - DriverManager.registerDriver(driver) + DriverManager.registerDriver(driver) DriverManager.registerDriver(driver!!) } diff --git a/compiler/testData/diagnostics/tests/jdk-annotations/sql/Statement.kt b/compiler/testData/diagnostics/tests/jdk-annotations/sql/Statement.kt index 8012c3830a4..8d29bc6afcd 100644 --- a/compiler/testData/diagnostics/tests/jdk-annotations/sql/Statement.kt +++ b/compiler/testData/diagnostics/tests/jdk-annotations/sql/Statement.kt @@ -1,5 +1,5 @@ fun executeQuery(statement: java.sql.Statement, cmd: String?) { - statement.executeQuery(cmd) + statement.executeQuery(cmd) statement.executeQuery(cmd!!) : java.sql.ResultSet } @@ -8,6 +8,6 @@ fun executeQuery(statement: java.sql.PreparedStatement) { } fun executeUpdate(statement: java.sql.Statement, cmd: String?) { - statement.executeUpdate(cmd) + statement.executeUpdate(cmd) statement.executeUpdate(cmd!!) } \ No newline at end of file diff --git a/compiler/testData/diagnostics/tests/nullabilityAndSmartCasts/kt1270.kt b/compiler/testData/diagnostics/tests/nullabilityAndSmartCasts/kt1270.kt index d69264a832c..3b0a1227122 100644 --- a/compiler/testData/diagnostics/tests/nullabilityAndSmartCasts/kt1270.kt +++ b/compiler/testData/diagnostics/tests/nullabilityAndSmartCasts/kt1270.kt @@ -1,10 +1,11 @@ +// !DIAGNOSTICS: -UNUSED_VARIABLE //KT-1270 Poor highlighting when trying to dereference a nullable reference package kt1270 fun foo() { val sc = java.util.HashMap()[""] - val value = sc.value + val value = sc.value } private class SomeClass() { diff --git a/compiler/testData/loadJava/compiledJava/EnumMembers.txt b/compiler/testData/loadJava/compiledJava/EnumMembers.txt index 31317f1f953..8f8ef8d6a9d 100644 --- a/compiler/testData/loadJava/compiledJava/EnumMembers.txt +++ b/compiler/testData/loadJava/compiledJava/EnumMembers.txt @@ -1,6 +1,6 @@ package test -public final enum class EnumMembers : kotlin.Enum { +public final enum class EnumMembers : kotlin.Enum { private constructor EnumMembers(/*0*/ p0: kotlin.Boolean) public final val isFirst: kotlin.Boolean public open fun first(): kotlin.Boolean diff --git a/compiler/testData/loadJava/compiledJava/InnerOfGeneric.txt b/compiler/testData/loadJava/compiledJava/InnerOfGeneric.txt index 8cf2ece2acf..4e5e68a1cd1 100644 --- a/compiler/testData/loadJava/compiledJava/InnerOfGeneric.txt +++ b/compiler/testData/loadJava/compiledJava/InnerOfGeneric.txt @@ -5,26 +5,26 @@ public open class InnerOfGeneric { public abstract inner class A { public constructor A() - - public abstract inner class Inner : test.InnerOfGeneric.S { + + public abstract inner class Inner : test.InnerOfGeneric.S { public constructor Inner() - public abstract override /*1*/ /*fake_override*/ fun iterator(): kotlin.MutableIterator? + public abstract override /*1*/ /*fake_override*/ fun iterator(): kotlin.(Mutable)Iterator! } } - - public open inner class B : test.InnerOfGeneric.A { + + public open inner class B : test.InnerOfGeneric.A { public constructor B() public open inner class SubInner : test.InnerOfGeneric.A.Inner { public constructor SubInner() - public open override /*1*/ fun iterator(): kotlin.MutableIterator? + public open override /*1*/ fun iterator(): kotlin.(Mutable)Iterator! } } public trait S { - public abstract fun iterator(): kotlin.MutableIterator? + public abstract fun iterator(): kotlin.(Mutable)Iterator! } // Static members - public final /*synthesized*/ fun S(/*0*/ function: () -> kotlin.MutableIterator?): test.InnerOfGeneric.S + public final /*synthesized*/ fun S(/*0*/ function: () -> kotlin.MutableIterator!): test.InnerOfGeneric.S } diff --git a/compiler/testData/loadJava/compiledJava/JavaEnum.txt b/compiler/testData/loadJava/compiledJava/JavaEnum.txt index 1a4a2f1d022..5933a52d12e 100644 --- a/compiler/testData/loadJava/compiledJava/JavaEnum.txt +++ b/compiler/testData/loadJava/compiledJava/JavaEnum.txt @@ -1,6 +1,6 @@ package test -public final enum class JavaEnum : kotlin.Enum { +public final enum class JavaEnum : kotlin.Enum { private constructor JavaEnum() public final override /*1*/ /*fake_override*/ fun name(): kotlin.String public final override /*1*/ /*fake_override*/ fun ordinal(): kotlin.Int diff --git a/compiler/testData/loadJava/compiledJava/OverrideMethod.txt b/compiler/testData/loadJava/compiledJava/OverrideMethod.txt index d862e396a9f..39ada0599c6 100644 --- a/compiler/testData/loadJava/compiledJava/OverrideMethod.txt +++ b/compiler/testData/loadJava/compiledJava/OverrideMethod.txt @@ -6,7 +6,7 @@ public open class OverrideMethod { public/*package*/ open inner class Base : test.OverrideMethod.SuperBase { public/*package*/ constructor Base() public/*package*/ open fun bar(): kotlin.Unit - public/*package*/ open fun foo(/*0*/ p0: kotlin.String?): kotlin.String? + public/*package*/ open fun foo(/*0*/ p0: kotlin.String!): kotlin.String! public/*package*/ open override /*1*/ /*fake_override*/ fun quux(/*0*/ p0: kotlin.Int): kotlin.Unit } @@ -14,7 +14,7 @@ public open class OverrideMethod { public/*package*/ constructor Derived() public/*package*/ open override /*1*/ /*fake_override*/ fun bar(): kotlin.Unit public/*package*/ open fun baz(): kotlin.Unit - public/*package*/ open override /*1*/ fun foo(/*0*/ p0: kotlin.String?): kotlin.String? + public/*package*/ open override /*1*/ fun foo(/*0*/ p0: kotlin.String!): kotlin.String! public/*package*/ open override /*1*/ /*fake_override*/ fun quux(/*0*/ p0: kotlin.Int): kotlin.Unit } diff --git a/compiler/testData/loadJava/compiledJava/PackageLocalVisibility.txt b/compiler/testData/loadJava/compiledJava/PackageLocalVisibility.txt index 3d553eb8fdf..5e15af38eef 100644 --- a/compiler/testData/loadJava/compiledJava/PackageLocalVisibility.txt +++ b/compiler/testData/loadJava/compiledJava/PackageLocalVisibility.txt @@ -2,5 +2,5 @@ package test public open class JFrame : awt.Frame { public constructor JFrame() - protected/*protected and package*/ final var accessibleContext: kotlin.String? + protected/*protected and package*/ final var accessibleContext: kotlin.String! } diff --git a/compiler/testData/loadJava/compiledJava/PrivateMembers.txt b/compiler/testData/loadJava/compiledJava/PrivateMembers.txt index f279cc4787d..93350ea65b4 100644 --- a/compiler/testData/loadJava/compiledJava/PrivateMembers.txt +++ b/compiler/testData/loadJava/compiledJava/PrivateMembers.txt @@ -5,8 +5,8 @@ public open class PrivateMembers { private final var field: kotlin.Int private open fun method(): kotlin.Unit private final /*synthesized*/ fun samAdapter(/*0*/ p0: (() -> kotlin.Unit)?): kotlin.Unit - private open fun samAdapter(/*0*/ p0: test.PrivateMembers.SamInterface?): kotlin.Unit - + private open fun samAdapter(/*0*/ p0: test.PrivateMembers.SamInterface!): kotlin.Unit + private open inner class Inner { private constructor Inner() } diff --git a/compiler/testData/loadJava/compiledJava/SubclassFromNested.txt b/compiler/testData/loadJava/compiledJava/SubclassFromNested.txt index 4f0adfdce0a..43c922aaa87 100644 --- a/compiler/testData/loadJava/compiledJava/SubclassFromNested.txt +++ b/compiler/testData/loadJava/compiledJava/SubclassFromNested.txt @@ -1,7 +1,7 @@ package test public/*package*/ open class B { - public/*package*/ constructor B(/*0*/ p0: test.B.C?) + public/*package*/ constructor B(/*0*/ p0: test.B.C!) public/*package*/ trait C { } diff --git a/compiler/testData/loadJava/compiledJava/annotations/CustomAnnotation.txt b/compiler/testData/loadJava/compiledJava/annotations/CustomAnnotation.txt index 5bb5dc11086..3c05c4ee984 100644 --- a/compiler/testData/loadJava/compiledJava/annotations/CustomAnnotation.txt +++ b/compiler/testData/loadJava/compiledJava/annotations/CustomAnnotation.txt @@ -7,7 +7,7 @@ public trait CustomAnnotation { public abstract fun value(): test.CustomAnnotation.MyEnum } - public final enum class MyEnum : kotlin.Enum { + public final enum class MyEnum : kotlin.Enum { private constructor MyEnum() public final override /*1*/ /*fake_override*/ fun name(): kotlin.String public final override /*1*/ /*fake_override*/ fun ordinal(): kotlin.Int diff --git a/compiler/testData/loadJava/compiledJava/annotations/NestedEnumArgument.txt b/compiler/testData/loadJava/compiledJava/annotations/NestedEnumArgument.txt index eeb14afcd6d..c30e7dc8d12 100644 --- a/compiler/testData/loadJava/compiledJava/annotations/NestedEnumArgument.txt +++ b/compiler/testData/loadJava/compiledJava/annotations/NestedEnumArgument.txt @@ -9,7 +9,7 @@ public open class NestedEnumArgument { public abstract fun value(): test.NestedEnumArgument.E } - public final enum class E : kotlin.Enum { + public final enum class E : kotlin.Enum { private constructor E() public final override /*1*/ /*fake_override*/ fun name(): kotlin.String public final override /*1*/ /*fake_override*/ fun ordinal(): kotlin.Int diff --git a/compiler/testData/loadJava/compiledJava/sam/Comparator.txt b/compiler/testData/loadJava/compiledJava/sam/Comparator.txt index 995b232f802..6fd478c32a4 100644 --- a/compiler/testData/loadJava/compiledJava/sam/Comparator.txt +++ b/compiler/testData/loadJava/compiledJava/sam/Comparator.txt @@ -1,7 +1,7 @@ package test -public /*synthesized*/ fun Comparator(/*0*/ function: (T?, T?) -> kotlin.Int): test.Comparator +public /*synthesized*/ fun Comparator(/*0*/ function: (T!, T!) -> kotlin.Int): test.Comparator public trait Comparator { - public abstract fun compare(/*0*/ p0: T?, /*1*/ p1: T?): kotlin.Int + public abstract fun compare(/*0*/ p0: T!, /*1*/ p1: T!): kotlin.Int } diff --git a/compiler/testData/loadJava/compiledJava/sam/FilenameFilter.txt b/compiler/testData/loadJava/compiledJava/sam/FilenameFilter.txt index 773be763152..6085a6c4b86 100644 --- a/compiler/testData/loadJava/compiledJava/sam/FilenameFilter.txt +++ b/compiler/testData/loadJava/compiledJava/sam/FilenameFilter.txt @@ -1,7 +1,7 @@ package test -public /*synthesized*/ fun FilenameFilter(/*0*/ function: (java.io.File?, kotlin.String?) -> kotlin.Boolean): test.FilenameFilter +public /*synthesized*/ fun FilenameFilter(/*0*/ function: (java.io.File!, kotlin.String!) -> kotlin.Boolean): test.FilenameFilter public trait FilenameFilter { - public abstract fun accept(/*0*/ p0: java.io.File?, /*1*/ p1: kotlin.String?): kotlin.Boolean + public abstract fun accept(/*0*/ p0: java.io.File!, /*1*/ p1: kotlin.String!): kotlin.Boolean } diff --git a/compiler/testData/loadJava/compiledJava/sam/GenericInterfaceParameterWithSelfBound.txt b/compiler/testData/loadJava/compiledJava/sam/GenericInterfaceParameterWithSelfBound.txt index a22ae28f067..04c323b6459 100644 --- a/compiler/testData/loadJava/compiledJava/sam/GenericInterfaceParameterWithSelfBound.txt +++ b/compiler/testData/loadJava/compiledJava/sam/GenericInterfaceParameterWithSelfBound.txt @@ -1,7 +1,7 @@ package test -public /*synthesized*/ fun ?> GenericInterfaceParameterWithSelfBound(/*0*/ function: (T?) -> T?): test.GenericInterfaceParameterWithSelfBound +public /*synthesized*/ fun !> GenericInterfaceParameterWithSelfBound(/*0*/ function: (T!) -> T!): test.GenericInterfaceParameterWithSelfBound -public trait GenericInterfaceParameterWithSelfBound?> { - public abstract fun method(/*0*/ p0: T?): T? +public trait GenericInterfaceParameterWithSelfBound!> { + public abstract fun method(/*0*/ p0: T!): T! } diff --git a/compiler/testData/loadJava/compiledJava/sam/GenericInterfaceParametersWithBounds.txt b/compiler/testData/loadJava/compiledJava/sam/GenericInterfaceParametersWithBounds.txt index 844834a8316..ed9c8a36b6a 100644 --- a/compiler/testData/loadJava/compiledJava/sam/GenericInterfaceParametersWithBounds.txt +++ b/compiler/testData/loadJava/compiledJava/sam/GenericInterfaceParametersWithBounds.txt @@ -1,7 +1,7 @@ package test -public /*synthesized*/ fun ?, /*1*/ B : kotlin.List?> GenericInterfaceParametersWithBounds(/*0*/ function: (kotlin.Array?, B?) -> kotlin.Unit): test.GenericInterfaceParametersWithBounds where A : kotlin.Cloneable? +public /*synthesized*/ fun !, /*1*/ B : kotlin.(Mutable)List!> GenericInterfaceParametersWithBounds(/*0*/ function: (kotlin.Array<(out) A!>!, B!) -> kotlin.Unit): test.GenericInterfaceParametersWithBounds where A : kotlin.Cloneable! -public trait GenericInterfaceParametersWithBounds?, /*1*/ B : kotlin.List?> where A : kotlin.Cloneable? { - public abstract fun method(/*0*/ p0: kotlin.Array?, /*1*/ p1: B?): kotlin.Unit +public trait GenericInterfaceParametersWithBounds!, /*1*/ B : kotlin.(Mutable)List!> where A : kotlin.Cloneable! { + public abstract fun method(/*0*/ p0: kotlin.Array<(out) A!>!, /*1*/ p1: B!): kotlin.Unit } diff --git a/compiler/testData/loadJava/compiledJava/sam/GenericMethodParameters.txt b/compiler/testData/loadJava/compiledJava/sam/GenericMethodParameters.txt index b60140c424c..426b9a2fcab 100644 --- a/compiler/testData/loadJava/compiledJava/sam/GenericMethodParameters.txt +++ b/compiler/testData/loadJava/compiledJava/sam/GenericMethodParameters.txt @@ -1,5 +1,5 @@ package test public trait GenericMethodParameters { - public abstract fun ?> method(/*0*/ p0: kotlin.Array?, /*1*/ p1: B?): kotlin.Unit + public abstract fun !> method(/*0*/ p0: kotlin.Array<(out) A!>!, /*1*/ p1: B!): kotlin.Unit } diff --git a/compiler/testData/loadJava/compiledJava/sam/SamSubinterfaceOfTwo.txt b/compiler/testData/loadJava/compiledJava/sam/SamSubinterfaceOfTwo.txt index a341c31c741..c46effcefe9 100644 --- a/compiler/testData/loadJava/compiledJava/sam/SamSubinterfaceOfTwo.txt +++ b/compiler/testData/loadJava/compiledJava/sam/SamSubinterfaceOfTwo.txt @@ -1,21 +1,21 @@ package test public trait SamSubinterfaceOfTwo { - - public trait Sub : test.SamSubinterfaceOfTwo.Super1, test.SamSubinterfaceOfTwo.Super2 { - public abstract override /*2*/ /*fake_override*/ fun f(): kotlin.String? + + public trait Sub : test.SamSubinterfaceOfTwo.Super1, test.SamSubinterfaceOfTwo.Super2 { + public abstract override /*2*/ /*fake_override*/ fun f(): kotlin.String! } public trait Super1 { - public abstract fun f(): kotlin.CharSequence? + public abstract fun f(): kotlin.CharSequence! } public trait Super2 { - public abstract fun f(): T? + public abstract fun f(): T! } // Static members - public final /*synthesized*/ fun Sub(/*0*/ function: () -> kotlin.String?): test.SamSubinterfaceOfTwo.Sub - public final /*synthesized*/ fun Super1(/*0*/ function: () -> kotlin.CharSequence?): test.SamSubinterfaceOfTwo.Super1 - public final /*synthesized*/ fun Super2(/*0*/ function: () -> T?): test.SamSubinterfaceOfTwo.Super2 + public /*synthesized*/ fun Sub(/*0*/ function: () -> kotlin.String!): test.SamSubinterfaceOfTwo.Sub + public /*synthesized*/ fun Super1(/*0*/ function: () -> kotlin.CharSequence!): test.SamSubinterfaceOfTwo.Super1 + public /*synthesized*/ fun Super2(/*0*/ function: () -> T!): test.SamSubinterfaceOfTwo.Super2 } diff --git a/compiler/testData/loadJava/compiledJava/sam/SubstitutedSamInterface.txt b/compiler/testData/loadJava/compiledJava/sam/SubstitutedSamInterface.txt index 3ba4ec2a28e..4e465e7fefa 100644 --- a/compiler/testData/loadJava/compiledJava/sam/SubstitutedSamInterface.txt +++ b/compiler/testData/loadJava/compiledJava/sam/SubstitutedSamInterface.txt @@ -1,7 +1,7 @@ package test -public /*synthesized*/ fun SubstitutedSamInterface(/*0*/ function: (kotlin.String, kotlin.String) -> kotlin.Int): test.SubstitutedSamInterface +public /*synthesized*/ fun SubstitutedSamInterface(/*0*/ function: (kotlin.String!, kotlin.String!) -> kotlin.Int): test.SubstitutedSamInterface -public trait SubstitutedSamInterface : java.util.Comparator { - public abstract override /*1*/ /*fake_override*/ fun compare(/*0*/ p0: kotlin.String, /*1*/ p1: kotlin.String): kotlin.Int +public trait SubstitutedSamInterface : java.util.Comparator { + public abstract override /*1*/ /*fake_override*/ fun compare(/*0*/ p0: kotlin.String!, /*1*/ p1: kotlin.String!): kotlin.Int } diff --git a/compiler/testData/loadJava/compiledJava/sam/SubstitutedSamInterfaceSubclassOfBuiltin.txt b/compiler/testData/loadJava/compiledJava/sam/SubstitutedSamInterfaceSubclassOfBuiltin.txt index ae3fadd30f2..7103eb80b8b 100644 --- a/compiler/testData/loadJava/compiledJava/sam/SubstitutedSamInterfaceSubclassOfBuiltin.txt +++ b/compiler/testData/loadJava/compiledJava/sam/SubstitutedSamInterfaceSubclassOfBuiltin.txt @@ -1,7 +1,7 @@ package test -public /*synthesized*/ fun SubstitutedSamInterfaceSubclassOfBuiltin(/*0*/ function: (test.SubstitutedSamInterfaceSubclassOfBuiltin) -> kotlin.Int): test.SubstitutedSamInterfaceSubclassOfBuiltin +public /*synthesized*/ fun SubstitutedSamInterfaceSubclassOfBuiltin(/*0*/ function: (test.SubstitutedSamInterfaceSubclassOfBuiltin!) -> kotlin.Int): test.SubstitutedSamInterfaceSubclassOfBuiltin -public trait SubstitutedSamInterfaceSubclassOfBuiltin : kotlin.Comparable { - public abstract override /*1*/ /*fake_override*/ fun compareTo(/*0*/ other: test.SubstitutedSamInterfaceSubclassOfBuiltin): kotlin.Int +public trait SubstitutedSamInterfaceSubclassOfBuiltin : kotlin.Comparable { + public abstract override /*1*/ /*fake_override*/ fun compareTo(/*0*/ other: test.SubstitutedSamInterfaceSubclassOfBuiltin!): kotlin.Int } diff --git a/compiler/testData/loadJava/compiledJava/sam/VarargParameter.txt b/compiler/testData/loadJava/compiledJava/sam/VarargParameter.txt index 212aae9bbb1..a6c513dcbad 100644 --- a/compiler/testData/loadJava/compiledJava/sam/VarargParameter.txt +++ b/compiler/testData/loadJava/compiledJava/sam/VarargParameter.txt @@ -1,7 +1,7 @@ package test -public /*synthesized*/ fun VarargParameter(/*0*/ function: (kotlin.Array) -> kotlin.Unit): test.VarargParameter +public /*synthesized*/ fun VarargParameter(/*0*/ function: (kotlin.Array<(out) kotlin.String!>!) -> kotlin.Unit): test.VarargParameter public trait VarargParameter { - public abstract fun f(/*0*/ vararg p0: kotlin.String? /*kotlin.Array*/): kotlin.Unit + public abstract fun f(/*0*/ vararg p0: kotlin.String! /*kotlin.Array<(out) kotlin.String!>!*/): kotlin.Unit } diff --git a/compiler/testData/loadJava/compiledJava/sam/adapters/AmbiguousAdapters.txt b/compiler/testData/loadJava/compiledJava/sam/adapters/AmbiguousAdapters.txt index 49dd8522754..3d69c69d4ab 100644 --- a/compiler/testData/loadJava/compiledJava/sam/adapters/AmbiguousAdapters.txt +++ b/compiler/testData/loadJava/compiledJava/sam/adapters/AmbiguousAdapters.txt @@ -4,6 +4,6 @@ public open class AmbiguousAdapters { public constructor AmbiguousAdapters() public final /*synthesized*/ fun foo(/*0*/ p0: (() -> kotlin.Unit)?): kotlin.Unit public final /*synthesized*/ fun foo(/*0*/ p0: (() -> kotlin.Unit)?): kotlin.Unit - public open fun foo(/*0*/ p0: java.io.Closeable?): kotlin.Unit - public open fun foo(/*0*/ p0: java.lang.Runnable?): kotlin.Unit + public open fun foo(/*0*/ p0: java.io.Closeable!): kotlin.Unit + public open fun foo(/*0*/ p0: java.lang.Runnable!): kotlin.Unit } diff --git a/compiler/testData/loadJava/compiledJava/sam/adapters/Basic.txt b/compiler/testData/loadJava/compiledJava/sam/adapters/Basic.txt index ff745a4d6bf..1b625560c37 100644 --- a/compiler/testData/loadJava/compiledJava/sam/adapters/Basic.txt +++ b/compiler/testData/loadJava/compiledJava/sam/adapters/Basic.txt @@ -3,9 +3,9 @@ package test public open class Basic { public constructor Basic() public final /*synthesized*/ fun foo(/*0*/ p0: (() -> kotlin.Unit)?): kotlin.Unit - public open fun foo(/*0*/ p0: java.lang.Runnable?): kotlin.Unit + public open fun foo(/*0*/ p0: java.lang.Runnable!): kotlin.Unit // Static members - public final /*synthesized*/ fun bar(/*0*/ p0: (() -> kotlin.Unit)?): kotlin.Unit - public open fun bar(/*0*/ p0: java.lang.Runnable?): kotlin.Unit + public /*synthesized*/ fun bar(/*0*/ p0: (() -> kotlin.Unit)?): kotlin.Unit + public open fun bar(/*0*/ p0: java.lang.Runnable!): kotlin.Unit } diff --git a/compiler/testData/loadJava/compiledJava/sam/adapters/Constructor.txt b/compiler/testData/loadJava/compiledJava/sam/adapters/Constructor.txt index 881c02934fd..feb9f32a186 100644 --- a/compiler/testData/loadJava/compiledJava/sam/adapters/Constructor.txt +++ b/compiler/testData/loadJava/compiledJava/sam/adapters/Constructor.txt @@ -2,5 +2,5 @@ package test public open class Constructor { public /*synthesized*/ constructor Constructor(/*0*/ p0: (() -> kotlin.Unit)?) - public constructor Constructor(/*0*/ p0: java.lang.Runnable?) + public constructor Constructor(/*0*/ p0: java.lang.Runnable!) } diff --git a/compiler/testData/loadJava/compiledJava/sam/adapters/DeepSamLoop.txt b/compiler/testData/loadJava/compiledJava/sam/adapters/DeepSamLoop.txt index 30a3d1e0e16..54d28bed348 100644 --- a/compiler/testData/loadJava/compiledJava/sam/adapters/DeepSamLoop.txt +++ b/compiler/testData/loadJava/compiledJava/sam/adapters/DeepSamLoop.txt @@ -4,12 +4,12 @@ public trait DeepSamLoop { public trait Bar { public final /*synthesized*/ fun foo(/*0*/ p0: ((test.DeepSamLoop.Bar?) -> kotlin.Unit)?): kotlin.Unit - public abstract fun foo(/*0*/ p0: test.DeepSamLoop.Foo?): kotlin.Unit + public abstract fun foo(/*0*/ p0: test.DeepSamLoop.Foo!): kotlin.Unit } public trait Foo { public final /*synthesized*/ fun foo(/*0*/ p0: ((test.DeepSamLoop.Foo?) -> kotlin.Unit)?): kotlin.Unit - public abstract fun foo(/*0*/ p0: test.DeepSamLoop.Bar?): kotlin.Unit + public abstract fun foo(/*0*/ p0: test.DeepSamLoop.Bar!): kotlin.Unit } // Static members diff --git a/compiler/testData/loadJava/compiledJava/sam/adapters/NonTrivialFunctionType.txt b/compiler/testData/loadJava/compiledJava/sam/adapters/NonTrivialFunctionType.txt index c76f8c5a832..33efd145f30 100644 --- a/compiler/testData/loadJava/compiledJava/sam/adapters/NonTrivialFunctionType.txt +++ b/compiler/testData/loadJava/compiledJava/sam/adapters/NonTrivialFunctionType.txt @@ -4,9 +4,9 @@ public open class NonTrivialFunctionType { public constructor NonTrivialFunctionType() public final /*synthesized*/ fun foo(/*0*/ p0: ((java.io.File, kotlin.String) -> kotlin.Boolean)?): kotlin.Unit public final /*synthesized*/ fun foo(/*0*/ p0: ((kotlin.String, kotlin.String) -> kotlin.Int)?): kotlin.Unit - public open fun foo(/*0*/ p0: java.io.FilenameFilter?): kotlin.Unit - public open fun foo(/*0*/ p0: java.util.Comparator?): kotlin.Unit + public open fun foo(/*0*/ p0: java.io.FilenameFilter!): kotlin.Unit + public open fun foo(/*0*/ p0: java.util.Comparator!): kotlin.Unit public final /*synthesized*/ fun wildcardBound(/*0*/ p0: ((kotlin.CharSequence?, kotlin.CharSequence?) -> kotlin.Int)?): kotlin.Unit - public open fun wildcardBound(/*0*/ p0: java.util.Comparator?): kotlin.Unit - public open fun wildcardUnbound(/*0*/ p0: java.util.Comparator?): kotlin.Unit + public open fun wildcardBound(/*0*/ p0: java.util.Comparator!): kotlin.Unit + public open fun wildcardUnbound(/*0*/ p0: java.util.Comparator!): kotlin.Unit } diff --git a/compiler/testData/loadJava/compiledJava/sam/adapters/SelfAsParameter.txt b/compiler/testData/loadJava/compiledJava/sam/adapters/SelfAsParameter.txt index 5f303ce82c1..0167719076f 100644 --- a/compiler/testData/loadJava/compiledJava/sam/adapters/SelfAsParameter.txt +++ b/compiler/testData/loadJava/compiledJava/sam/adapters/SelfAsParameter.txt @@ -1,8 +1,8 @@ package test -public /*synthesized*/ fun SelfAsParameter(/*0*/ function: (test.SelfAsParameter?) -> kotlin.Unit): test.SelfAsParameter +public /*synthesized*/ fun SelfAsParameter(/*0*/ function: (test.SelfAsParameter!) -> kotlin.Unit): test.SelfAsParameter public trait SelfAsParameter { - public final /*synthesized*/ fun foo(/*0*/ p0: ((test.SelfAsParameter?) -> kotlin.Unit)?): kotlin.Unit - public abstract fun foo(/*0*/ p0: test.SelfAsParameter?): kotlin.Unit + public final /*synthesized*/ fun foo(/*0*/ p0: ((test.SelfAsParameter!) -> kotlin.Unit)!): kotlin.Unit + public abstract fun foo(/*0*/ p0: test.SelfAsParameter!): kotlin.Unit } diff --git a/compiler/testData/loadJava/compiledJava/sam/adapters/SeveralSamParameters.txt b/compiler/testData/loadJava/compiledJava/sam/adapters/SeveralSamParameters.txt index b86d0fd1c2d..1790c483c76 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 final /*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? + 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 284b3d8c747..4792c797fc5 100644 --- a/compiler/testData/loadJava/compiledJava/sam/adapters/TypeParameterOfClass.txt +++ b/compiler/testData/loadJava/compiledJava/sam/adapters/TypeParameterOfClass.txt @@ -3,5 +3,5 @@ package test public open class TypeParameterOfClass { public constructor TypeParameterOfClass() public final /*synthesized*/ fun foo(/*0*/ p0: ((T, T) -> kotlin.Int)?): kotlin.Unit - public open fun foo(/*0*/ p0: java.util.Comparator?): 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 3d680547951..831ba5eebb9 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 final /*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 final /*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 final /*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 + 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 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 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 1fda8345520..872f960dac0 100644 --- a/compiler/testData/loadJava/compiledJava/sam/adapters/TypeParameterOfOuterClass.txt +++ b/compiler/testData/loadJava/compiledJava/sam/adapters/TypeParameterOfOuterClass.txt @@ -6,6 +6,6 @@ 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 open fun foo(/*0*/ p0: java.util.Comparator?): kotlin.Unit + public open fun foo(/*0*/ p0: java.util.Comparator!): kotlin.Unit } } diff --git a/compiler/testData/loadJava/compiledJava/sam/adapters/inheritance/InheritedSimple.txt b/compiler/testData/loadJava/compiledJava/sam/adapters/inheritance/InheritedSimple.txt index 0fa258f47c5..cf43fe3ad8e 100644 --- a/compiler/testData/loadJava/compiledJava/sam/adapters/inheritance/InheritedSimple.txt +++ b/compiler/testData/loadJava/compiledJava/sam/adapters/inheritance/InheritedSimple.txt @@ -4,15 +4,15 @@ public trait InheritedSimple { public trait Sub : test.InheritedSimple.Super { public final override /*1*/ /*fake_override*/ fun foo(/*0*/ p0: (() -> kotlin.Unit)?): kotlin.Unit - public abstract override /*1*/ /*fake_override*/ fun foo(/*0*/ p0: java.lang.Runnable?): kotlin.Unit + public abstract override /*1*/ /*fake_override*/ fun foo(/*0*/ p0: java.lang.Runnable!): kotlin.Unit } public trait Super { public final /*synthesized*/ fun foo(/*0*/ p0: (() -> kotlin.Unit)?): kotlin.Unit - public abstract fun foo(/*0*/ p0: java.lang.Runnable?): kotlin.Unit + public abstract fun foo(/*0*/ p0: java.lang.Runnable!): kotlin.Unit } // Static members - public final /*synthesized*/ fun Sub(/*0*/ function: (java.lang.Runnable?) -> kotlin.Unit): test.InheritedSimple.Sub - public final /*synthesized*/ fun Super(/*0*/ function: (java.lang.Runnable?) -> kotlin.Unit): test.InheritedSimple.Super + public /*synthesized*/ fun Sub(/*0*/ function: (java.lang.Runnable!) -> kotlin.Unit): test.InheritedSimple.Sub + public /*synthesized*/ fun Super(/*0*/ function: (java.lang.Runnable!) -> kotlin.Unit): test.InheritedSimple.Super } diff --git a/compiler/testData/loadJava/compiledJava/signaturePropagation/TwoSuperclassesVarargAndNot.txt b/compiler/testData/loadJava/compiledJava/signaturePropagation/TwoSuperclassesVarargAndNot.txt index c18933990d3..afa30e14b15 100644 --- a/compiler/testData/loadJava/compiledJava/signaturePropagation/TwoSuperclassesVarargAndNot.txt +++ b/compiler/testData/loadJava/compiledJava/signaturePropagation/TwoSuperclassesVarargAndNot.txt @@ -3,19 +3,18 @@ package test public trait TwoSuperclassesVarargAndNot { public trait Sub : test.TwoSuperclassesVarargAndNot.Super1, test.TwoSuperclassesVarargAndNot.Super2 { - public abstract override /*1*/ /*fake_override*/ fun foo(/*0*/ vararg p0: kotlin.String? /*kotlin.Array*/): kotlin.Unit - public abstract override /*1*/ fun foo(/*0*/ s: kotlin.Array?): kotlin.Unit + public abstract override /*2*/ fun foo(/*0*/ p0: kotlin.Array<(out) kotlin.String!>!): kotlin.Unit } public trait Super1 { - public abstract fun foo(/*0*/ vararg p0: kotlin.String? /*kotlin.Array*/): kotlin.Unit + public abstract fun foo(/*0*/ vararg p0: kotlin.String! /*kotlin.Array<(out) kotlin.String!>!*/): kotlin.Unit } public trait Super2 { - public abstract fun foo(/*0*/ s: kotlin.Array?): kotlin.Unit + public abstract fun foo(/*0*/ p0: kotlin.Array<(out) kotlin.String!>!): kotlin.Unit } // Static members - public final /*synthesized*/ fun Super1(/*0*/ function: (kotlin.Array) -> kotlin.Unit): test.TwoSuperclassesVarargAndNot.Super1 - public final /*synthesized*/ fun Super2(/*0*/ function: (kotlin.Array?) -> kotlin.Unit): test.TwoSuperclassesVarargAndNot.Super2 + public /*synthesized*/ fun Super1(/*0*/ function: (kotlin.Array<(out) kotlin.String!>!) -> kotlin.Unit): test.TwoSuperclassesVarargAndNot.Super1 + public /*synthesized*/ fun Super2(/*0*/ function: (kotlin.Array<(out) kotlin.String!>!) -> kotlin.Unit): test.TwoSuperclassesVarargAndNot.Super2 } diff --git a/compiler/testData/loadJava/compiledJava/vararg/VarargInt.txt b/compiler/testData/loadJava/compiledJava/vararg/VarargInt.txt index fa1445cf4b1..dcb964db97d 100644 --- a/compiler/testData/loadJava/compiledJava/vararg/VarargInt.txt +++ b/compiler/testData/loadJava/compiledJava/vararg/VarargInt.txt @@ -2,5 +2,5 @@ package test public open class VarargInt { public constructor VarargInt() - public open fun vararg(/*0*/ vararg p0: kotlin.Int /*kotlin.IntArray*/): kotlin.Unit + public open fun vararg(/*0*/ vararg p0: kotlin.Int /*kotlin.IntArray!*/): kotlin.Unit } diff --git a/compiler/testData/loadJava/compiledJava/vararg/VarargString.txt b/compiler/testData/loadJava/compiledJava/vararg/VarargString.txt index 6294b87ed40..36414b98d49 100644 --- a/compiler/testData/loadJava/compiledJava/vararg/VarargString.txt +++ b/compiler/testData/loadJava/compiledJava/vararg/VarargString.txt @@ -2,5 +2,5 @@ package test public open class VarargString { public constructor VarargString() - public open fun vararg(/*0*/ vararg p0: kotlin.String? /*kotlin.Array*/): kotlin.Unit + public open fun vararg(/*0*/ vararg p0: kotlin.String! /*kotlin.Array<(out) kotlin.String!>!*/): kotlin.Unit } diff --git a/compiler/testData/loadJava/compiledJavaIncludeObjectMethods/ClassWithObjectMethod.txt b/compiler/testData/loadJava/compiledJavaIncludeObjectMethods/ClassWithObjectMethod.txt index d83e51668c1..96ba443f37e 100644 --- a/compiler/testData/loadJava/compiledJavaIncludeObjectMethods/ClassWithObjectMethod.txt +++ b/compiler/testData/loadJava/compiledJavaIncludeObjectMethods/ClassWithObjectMethod.txt @@ -4,5 +4,5 @@ public final class ClassWithObjectMethod { public constructor ClassWithObjectMethod() public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int - public open override /*1*/ fun toString(): kotlin.String + public open override /*1*/ fun toString(): kotlin.String! } diff --git a/compiler/testData/loadJava/compiledJavaIncludeObjectMethods/InterfaceWithObjectMethods.txt b/compiler/testData/loadJava/compiledJavaIncludeObjectMethods/InterfaceWithObjectMethods.txt index 3ad611488f4..441a3660465 100644 --- a/compiler/testData/loadJava/compiledJavaIncludeObjectMethods/InterfaceWithObjectMethods.txt +++ b/compiler/testData/loadJava/compiledJavaIncludeObjectMethods/InterfaceWithObjectMethods.txt @@ -1,7 +1,7 @@ package test public trait InterfaceWithObjectMethods { - public abstract fun clone(): kotlin.Any? + public abstract fun clone(): kotlin.Any! public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean public abstract fun finalize(): kotlin.Unit public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int diff --git a/compiler/testData/loadJava/compiledKotlin/fromLoadJava/ClassDoesNotOverrideMethod.txt b/compiler/testData/loadJava/compiledKotlin/fromLoadJava/ClassDoesNotOverrideMethod.txt index 734f5608031..f6726c1fe26 100644 --- a/compiler/testData/loadJava/compiledKotlin/fromLoadJava/ClassDoesNotOverrideMethod.txt +++ b/compiler/testData/loadJava/compiledKotlin/fromLoadJava/ClassDoesNotOverrideMethod.txt @@ -2,13 +2,13 @@ package test public abstract class ClassDoesNotOverrideMethod : java.util.Date { /*primary*/ 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 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 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! 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 -} \ No newline at end of file + 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/compiledKotlin/fromLoadJava/modality/ModalityOfFakeOverrides.txt b/compiler/testData/loadJava/compiledKotlin/fromLoadJava/modality/ModalityOfFakeOverrides.txt index 271e4fcbc94..4994941aae5 100644 --- a/compiler/testData/loadJava/compiledKotlin/fromLoadJava/modality/ModalityOfFakeOverrides.txt +++ b/compiler/testData/loadJava/compiledKotlin/fromLoadJava/modality/ModalityOfFakeOverrides.txt @@ -3,30 +3,30 @@ package test public open class ModalityOfFakeOverrides : java.util.AbstractList { /*primary*/ public constructor ModalityOfFakeOverrides() protected/*protected and package*/ final override /*1*/ /*fake_override*/ var modCount: kotlin.Int - public open override /*1*/ /*fake_override*/ fun add(/*0*/ index: kotlin.Int, /*1*/ element: kotlin.String): kotlin.Unit - public open override /*1*/ /*fake_override*/ fun add(/*0*/ e: kotlin.String): kotlin.Boolean - public open override /*1*/ /*fake_override*/ fun addAll(/*0*/ c: kotlin.Collection): kotlin.Boolean - public open override /*1*/ /*fake_override*/ fun addAll(/*0*/ index: kotlin.Int, /*1*/ c: kotlin.Collection): kotlin.Boolean + public open override /*1*/ /*fake_override*/ fun add(/*0*/ index: kotlin.Int, /*1*/ element: kotlin.String!): kotlin.Unit + public open override /*1*/ /*fake_override*/ fun add(/*0*/ e: kotlin.String!): kotlin.Boolean + public open override /*1*/ /*fake_override*/ fun addAll(/*0*/ c: kotlin.Collection): kotlin.Boolean + public open override /*1*/ /*fake_override*/ fun addAll(/*0*/ index: kotlin.Int, /*1*/ c: (kotlin.MutableCollection..kotlin.Collection?)): kotlin.Boolean public open override /*1*/ /*fake_override*/ fun clear(): kotlin.Unit public open override /*1*/ /*fake_override*/ fun contains(/*0*/ o: kotlin.Any?): kotlin.Boolean public open override /*1*/ /*fake_override*/ fun containsAll(/*0*/ c: kotlin.Collection): kotlin.Boolean public open override /*1*/ fun get(/*0*/ index: kotlin.Int): kotlin.String - public open override /*1*/ /*fake_override*/ fun indexOf(/*0*/ o: kotlin.Any?): kotlin.Int + public open override /*1*/ /*fake_override*/ fun indexOf(/*0*/ o: kotlin.Any!): kotlin.Int public open override /*1*/ /*fake_override*/ fun isEmpty(): kotlin.Boolean - public open override /*1*/ /*fake_override*/ fun iterator(): kotlin.MutableIterator - public open override /*1*/ /*fake_override*/ fun lastIndexOf(/*0*/ o: kotlin.Any?): kotlin.Int - public open override /*1*/ /*fake_override*/ fun listIterator(): kotlin.MutableListIterator - public open override /*1*/ /*fake_override*/ fun listIterator(/*0*/ index: kotlin.Int): kotlin.MutableListIterator - invisible_fake open override /*1*/ /*fake_override*/ fun outOfBoundsMsg(/*0*/ p0: kotlin.Int): kotlin.String? + public open override /*1*/ /*fake_override*/ fun iterator(): kotlin.(Mutable)Iterator! + public open override /*1*/ /*fake_override*/ fun lastIndexOf(/*0*/ o: kotlin.Any!): kotlin.Int + public open override /*1*/ /*fake_override*/ fun listIterator(): kotlin.(Mutable)ListIterator! + public open override /*1*/ /*fake_override*/ fun listIterator(/*0*/ index: kotlin.Int): kotlin.(Mutable)ListIterator! + invisible_fake open override /*1*/ /*fake_override*/ fun outOfBoundsMsg(/*0*/ p0: kotlin.Int): kotlin.String! invisible_fake open override /*1*/ /*fake_override*/ fun rangeCheckForAdd(/*0*/ p0: kotlin.Int): kotlin.Unit public open override /*1*/ /*fake_override*/ fun remove(/*0*/ o: kotlin.Any?): kotlin.Boolean - public open override /*1*/ /*fake_override*/ fun remove(/*0*/ index: kotlin.Int): kotlin.String + public open override /*1*/ /*fake_override*/ fun remove(/*0*/ index: kotlin.Int): kotlin.String! public open override /*1*/ /*fake_override*/ fun removeAll(/*0*/ c: kotlin.Collection): kotlin.Boolean protected/*protected and package*/ open override /*1*/ /*fake_override*/ fun removeRange(/*0*/ p0: kotlin.Int, /*1*/ p1: kotlin.Int): kotlin.Unit public open override /*1*/ /*fake_override*/ fun retainAll(/*0*/ c: kotlin.Collection): kotlin.Boolean - public open override /*1*/ /*fake_override*/ fun set(/*0*/ index: kotlin.Int, /*1*/ element: kotlin.String): kotlin.String + public open override /*1*/ /*fake_override*/ fun set(/*0*/ index: kotlin.Int, /*1*/ element: kotlin.String!): kotlin.String! public open override /*1*/ fun size(): kotlin.Int - public open override /*1*/ /*fake_override*/ fun subList(/*0*/ fromIndex: kotlin.Int, /*1*/ toIndex: kotlin.Int): kotlin.MutableList - public open override /*1*/ /*fake_override*/ fun toArray(): kotlin.Array - public open override /*1*/ /*fake_override*/ fun toArray(/*0*/ a: kotlin.Array): kotlin.Array -} \ No newline at end of file + public open override /*1*/ /*fake_override*/ fun subList(/*0*/ fromIndex: kotlin.Int, /*1*/ toIndex: kotlin.Int): kotlin.(Mutable)List! + public open override /*1*/ /*fake_override*/ fun toArray(): kotlin.Array<(out) kotlin.Any!>! + public open override /*1*/ /*fake_override*/ fun toArray(/*0*/ a: kotlin.Array<(out) T!>!): kotlin.Array<(out) T!>! +} diff --git a/compiler/testData/loadJava/javaAgainstKotlin/samAdapters/InheritAmbguousSamAdaptersInKotlin.txt b/compiler/testData/loadJava/javaAgainstKotlin/samAdapters/InheritAmbguousSamAdaptersInKotlin.txt index e75cabb98ad..f3c933c5508 100644 --- a/compiler/testData/loadJava/javaAgainstKotlin/samAdapters/InheritAmbguousSamAdaptersInKotlin.txt +++ b/compiler/testData/loadJava/javaAgainstKotlin/samAdapters/InheritAmbguousSamAdaptersInKotlin.txt @@ -2,16 +2,16 @@ package test public final class Sub : test.Super { public constructor Sub() - public/*package*/ final override /*1*/ /*fake_override*/ fun foo(/*0*/ r: (() -> kotlin.Unit)?): kotlin.Unit - public/*package*/ final override /*1*/ /*fake_override*/ fun foo(/*0*/ r: (() -> kotlin.Unit)?): kotlin.Unit - public/*package*/ open override /*1*/ /*fake_override*/ fun foo(/*0*/ r: java.io.Closeable?): kotlin.Unit - public/*package*/ open override /*1*/ /*fake_override*/ fun foo(/*0*/ r: java.lang.Runnable?): kotlin.Unit + public/*package*/ final override /*1*/ /*fake_override*/ fun foo(/*0*/ r: (() -> kotlin.Unit)!): kotlin.Unit + public/*package*/ final override /*1*/ /*fake_override*/ fun foo(/*0*/ r: (() -> kotlin.Unit)!): kotlin.Unit + public/*package*/ open override /*1*/ /*fake_override*/ fun foo(/*0*/ r: java.io.Closeable!): kotlin.Unit + public/*package*/ open override /*1*/ /*fake_override*/ fun foo(/*0*/ r: java.lang.Runnable!): kotlin.Unit } public open class Super { public constructor Super() - public/*package*/ final /*synthesized*/ fun foo(/*0*/ r: (() -> kotlin.Unit)?): kotlin.Unit - public/*package*/ final /*synthesized*/ fun foo(/*0*/ r: (() -> kotlin.Unit)?): kotlin.Unit - public/*package*/ open fun foo(/*0*/ r: java.io.Closeable?): kotlin.Unit - public/*package*/ open fun foo(/*0*/ r: java.lang.Runnable?): kotlin.Unit + public/*package*/ final /*synthesized*/ fun foo(/*0*/ r: (() -> kotlin.Unit)!): kotlin.Unit + public/*package*/ final /*synthesized*/ fun foo(/*0*/ r: (() -> kotlin.Unit)!): kotlin.Unit + public/*package*/ open fun foo(/*0*/ r: java.io.Closeable!): kotlin.Unit + public/*package*/ open fun foo(/*0*/ r: java.lang.Runnable!): kotlin.Unit } diff --git a/compiler/testData/loadJava/javaAgainstKotlin/samAdapters/InheritSamAdapterInKotlin.txt b/compiler/testData/loadJava/javaAgainstKotlin/samAdapters/InheritSamAdapterInKotlin.txt index 607652ee0df..175c3db2dd2 100644 --- a/compiler/testData/loadJava/javaAgainstKotlin/samAdapters/InheritSamAdapterInKotlin.txt +++ b/compiler/testData/loadJava/javaAgainstKotlin/samAdapters/InheritSamAdapterInKotlin.txt @@ -2,12 +2,12 @@ package test public final class Sub : test.Super { public constructor Sub() - public/*package*/ final override /*1*/ /*fake_override*/ fun foo(/*0*/ r: (() -> kotlin.Unit)?): kotlin.Unit - public/*package*/ open override /*1*/ /*fake_override*/ fun foo(/*0*/ r: java.lang.Runnable?): kotlin.Unit + public/*package*/ final override /*1*/ /*fake_override*/ fun foo(/*0*/ r: (() -> kotlin.Unit)!): kotlin.Unit + public/*package*/ open override /*1*/ /*fake_override*/ fun foo(/*0*/ r: java.lang.Runnable!): kotlin.Unit } public open class Super { public constructor Super() - public/*package*/ final /*synthesized*/ fun foo(/*0*/ r: (() -> kotlin.Unit)?): kotlin.Unit - public/*package*/ open fun foo(/*0*/ r: java.lang.Runnable?): kotlin.Unit + public/*package*/ final /*synthesized*/ fun foo(/*0*/ r: (() -> kotlin.Unit)!): kotlin.Unit + public/*package*/ open fun foo(/*0*/ r: java.lang.Runnable!): kotlin.Unit } diff --git a/compiler/testData/loadJava/javaAgainstKotlin/samAdapters/OverrideSamAdapterInKotlin.txt b/compiler/testData/loadJava/javaAgainstKotlin/samAdapters/OverrideSamAdapterInKotlin.txt index 18d14397e62..eebc4a3c74d 100644 --- a/compiler/testData/loadJava/javaAgainstKotlin/samAdapters/OverrideSamAdapterInKotlin.txt +++ b/compiler/testData/loadJava/javaAgainstKotlin/samAdapters/OverrideSamAdapterInKotlin.txt @@ -3,11 +3,11 @@ package test public final class Sub : test.Super { public constructor Sub() internal open override /*1*/ fun foo(/*0*/ r: (() -> kotlin.Unit)?): kotlin.Unit - public/*package*/ open override /*1*/ /*fake_override*/ fun foo(/*0*/ r: java.lang.Runnable?): kotlin.Unit + public/*package*/ open override /*1*/ /*fake_override*/ fun foo(/*0*/ r: java.lang.Runnable!): kotlin.Unit } public open class Super { public constructor Super() - public/*package*/ final /*synthesized*/ fun foo(/*0*/ r: (() -> kotlin.Unit)?): kotlin.Unit - public/*package*/ open fun foo(/*0*/ r: java.lang.Runnable?): kotlin.Unit + public/*package*/ final /*synthesized*/ fun foo(/*0*/ r: (() -> kotlin.Unit)!): kotlin.Unit + public/*package*/ open fun foo(/*0*/ r: java.lang.Runnable!): kotlin.Unit } diff --git a/compiler/testData/loadJava/javaAgainstKotlin/samAdapters/SamAdapterForOverriddenFromKotlin.txt b/compiler/testData/loadJava/javaAgainstKotlin/samAdapters/SamAdapterForOverriddenFromKotlin.txt index 2b4ba5db886..8d5333eac12 100644 --- a/compiler/testData/loadJava/javaAgainstKotlin/samAdapters/SamAdapterForOverriddenFromKotlin.txt +++ b/compiler/testData/loadJava/javaAgainstKotlin/samAdapters/SamAdapterForOverriddenFromKotlin.txt @@ -2,8 +2,8 @@ package test public open class Sub : test.Super { public constructor Sub() - public final /*synthesized*/ fun foo(/*0*/ r: () -> kotlin.Unit): kotlin.Unit - public open override /*1*/ fun foo(/*0*/ r: java.lang.Runnable): kotlin.Unit + public final /*synthesized*/ fun foo(/*0*/ r: (() -> kotlin.Unit)!): kotlin.Unit + public open override /*1*/ fun foo(/*0*/ r: java.lang.Runnable!): kotlin.Unit } public final class Super { diff --git a/compiler/testData/loadJava/javaAgainstKotlin/signaturePropagation/DeepSubclassingKotlinInJava.txt b/compiler/testData/loadJava/javaAgainstKotlin/signaturePropagation/DeepSubclassingKotlinInJava.txt index 8f00c29fcc6..223dfd90158 100644 --- a/compiler/testData/loadJava/javaAgainstKotlin/signaturePropagation/DeepSubclassingKotlinInJava.txt +++ b/compiler/testData/loadJava/javaAgainstKotlin/signaturePropagation/DeepSubclassingKotlinInJava.txt @@ -7,7 +7,7 @@ public open class A { public open class B : test.A { public constructor B() - public open override /*1*/ fun foo(): kotlin.String + public open override /*1*/ fun foo(): kotlin.String! } public open class C : test.B { @@ -17,7 +17,7 @@ public open class C : test.B { public open class D : test.C { public constructor D() - public open override /*1*/ fun foo(): kotlin.String + public open override /*1*/ fun foo(): kotlin.String! } public open class E : test.D { @@ -27,5 +27,5 @@ public open class E : test.D { public open class F : test.E { public constructor F() - public open override /*1*/ fun foo(): kotlin.String + public open override /*1*/ fun foo(): kotlin.String! } diff --git a/compiler/testData/loadJava/javaAgainstKotlin/signaturePropagation/InheritExtensionAndNot.txt b/compiler/testData/loadJava/javaAgainstKotlin/signaturePropagation/InheritExtensionAndNot.txt index d6713d6b4f8..2864f67824c 100644 --- a/compiler/testData/loadJava/javaAgainstKotlin/signaturePropagation/InheritExtensionAndNot.txt +++ b/compiler/testData/loadJava/javaAgainstKotlin/signaturePropagation/InheritExtensionAndNot.txt @@ -1,8 +1,8 @@ package test public trait Sub : test.Super1, test.Super2 { - public abstract override /*1*/ fun bar(/*0*/ vararg p: kotlin.String /*kotlin.Array*/): kotlin.Unit - public abstract override /*1*/ fun foo(/*0*/ p: kotlin.String): kotlin.Unit + public abstract override /*1*/ fun bar(/*0*/ vararg p: kotlin.String! /*kotlin.Array<(out) kotlin.String!>!*/): kotlin.Unit + public abstract override /*1*/ fun foo(/*0*/ p: kotlin.String!): kotlin.Unit public abstract override /*1*/ /*fake_override*/ fun kotlin.Array.bar(): kotlin.Unit public abstract override /*1*/ /*fake_override*/ fun kotlin.String.foo(): kotlin.Unit } diff --git a/compiler/testData/loadJava/javaAgainstKotlin/signaturePropagation/InheritExtensionFunction.txt b/compiler/testData/loadJava/javaAgainstKotlin/signaturePropagation/InheritExtensionFunction.txt index aca2de9c103..b15451c9d0f 100644 --- a/compiler/testData/loadJava/javaAgainstKotlin/signaturePropagation/InheritExtensionFunction.txt +++ b/compiler/testData/loadJava/javaAgainstKotlin/signaturePropagation/InheritExtensionFunction.txt @@ -2,7 +2,7 @@ package test public open class Sub : test.Super { public constructor Sub() - public open override /*1*/ fun kotlin.String.bar(/*0*/ p: kotlin.String): kotlin.String + public open override /*1*/ fun kotlin.String!.bar(/*0*/ p: kotlin.String!): kotlin.String! public final override /*1*/ /*fake_override*/ fun kotlin.String.foo(): kotlin.Unit } diff --git a/compiler/testData/loadJava/javaAgainstKotlin/signaturePropagation/SubclassFromTraitImplementation.txt b/compiler/testData/loadJava/javaAgainstKotlin/signaturePropagation/SubclassFromTraitImplementation.txt index d695d8ad434..4b5c4677dd5 100644 --- a/compiler/testData/loadJava/javaAgainstKotlin/signaturePropagation/SubclassFromTraitImplementation.txt +++ b/compiler/testData/loadJava/javaAgainstKotlin/signaturePropagation/SubclassFromTraitImplementation.txt @@ -8,7 +8,7 @@ internal open class Impl : test.Trait { public open class Subclass : test.Impl { public constructor Subclass() - java.lang.Override() public open override /*1*/ fun bar(): kotlin.String + java.lang.Override() public open override /*1*/ fun bar(): kotlin.String! internal open override /*1*/ /*fake_override*/ fun foo(): kotlin.String } diff --git a/compiler/testData/loadJava/javaAgainstKotlin/signaturePropagation/SubclassingKotlinInJava.txt b/compiler/testData/loadJava/javaAgainstKotlin/signaturePropagation/SubclassingKotlinInJava.txt index cd5842fdebe..d9c07762f24 100644 --- a/compiler/testData/loadJava/javaAgainstKotlin/signaturePropagation/SubclassingKotlinInJava.txt +++ b/compiler/testData/loadJava/javaAgainstKotlin/signaturePropagation/SubclassingKotlinInJava.txt @@ -2,7 +2,7 @@ package test public open class JavaSubclass : test.KotlinClass { public constructor JavaSubclass() - public open override /*1*/ fun foo(): kotlin.String + public open override /*1*/ fun foo(): kotlin.String! } public open class KotlinClass { diff --git a/compiler/testData/loadJava/kotlinAgainstCompiledJavaWithKotlin/javaRefersToKotlin.txt b/compiler/testData/loadJava/kotlinAgainstCompiledJavaWithKotlin/javaRefersToKotlin.txt index 71ab1f75ee3..d4ee5edb09a 100644 --- a/compiler/testData/loadJava/kotlinAgainstCompiledJavaWithKotlin/javaRefersToKotlin.txt +++ b/compiler/testData/loadJava/kotlinAgainstCompiledJavaWithKotlin/javaRefersToKotlin.txt @@ -1,9 +1,9 @@ package test -public /*synthesized*/ fun J(/*0*/ function: (test.K?) -> kotlin.Unit): test.J +public /*synthesized*/ fun J(/*0*/ function: (test.K!) -> kotlin.Unit): test.J public trait J { - public abstract fun foo(/*0*/ p0: test.K?): kotlin.Unit + public abstract fun foo(/*0*/ p0: test.K!): kotlin.Unit } internal trait K { diff --git a/compiler/testData/loadJava/kotlinAgainstCompiledJavaWithKotlin/propagationAgainstDeserializedSuperclass.txt b/compiler/testData/loadJava/kotlinAgainstCompiledJavaWithKotlin/propagationAgainstDeserializedSuperclass.txt index 1929b5898d9..8fa5fa08b24 100644 --- a/compiler/testData/loadJava/kotlinAgainstCompiledJavaWithKotlin/propagationAgainstDeserializedSuperclass.txt +++ b/compiler/testData/loadJava/kotlinAgainstCompiledJavaWithKotlin/propagationAgainstDeserializedSuperclass.txt @@ -2,7 +2,7 @@ package test public open class J : test.K { public constructor J() - public open override /*1*/ fun foo(/*0*/ l: kotlin.MutableList): kotlin.String + public open override /*1*/ fun foo(/*0*/ l: kotlin.(Mutable)List!): kotlin.String! } internal trait K { diff --git a/compiler/testData/loadJava/sourceJava/ErrorTypes.txt b/compiler/testData/loadJava/sourceJava/ErrorTypes.txt index fc962a86007..e7c6ed5f281 100644 --- a/compiler/testData/loadJava/sourceJava/ErrorTypes.txt +++ b/compiler/testData/loadJava/sourceJava/ErrorTypes.txt @@ -3,13 +3,13 @@ package test public trait ErrorTypes { public trait Sub : test.ErrorTypes.Super { - public abstract fun errorTypeInParameter(/*0*/ list: kotlin.List?>?): kotlin.Unit - public abstract override /*1*/ /*fake_override*/ fun errorTypeInParameter(/*0*/ list: kotlin.List?>?): kotlin.Unit - public abstract override /*1*/ fun returnErrorType(): [ERROR : Unresolved java classifier: T]? + public abstract fun errorTypeInParameter(/*0*/ list: kotlin.(Mutable)List!>!): kotlin.Unit + public abstract override /*1*/ /*fake_override*/ fun errorTypeInParameter(/*0*/ list: kotlin.(Mutable)List!>!): kotlin.Unit + public abstract override /*1*/ fun returnErrorType(): [ERROR : Unresolved java classifier: T]! } public trait Super { - public abstract fun errorTypeInParameter(/*0*/ list: kotlin.List?>?): kotlin.Unit - public abstract fun returnErrorType(): [ERROR : Unresolved java classifier: T]? + public abstract fun errorTypeInParameter(/*0*/ list: kotlin.(Mutable)List!>!): kotlin.Unit + public abstract fun returnErrorType(): [ERROR : Unresolved java classifier: T]! } } diff --git a/compiler/testData/loadJava/sourceJava/ReturnInnerSubclassOfSupersInner.txt b/compiler/testData/loadJava/sourceJava/ReturnInnerSubclassOfSupersInner.txt index ddd0d9d04d7..8d3069ac5df 100644 --- a/compiler/testData/loadJava/sourceJava/ReturnInnerSubclassOfSupersInner.txt +++ b/compiler/testData/loadJava/sourceJava/ReturnInnerSubclassOfSupersInner.txt @@ -2,12 +2,12 @@ package test public trait ReturnInnerSubclassOfSupersInner { - public open class Sub : test.ReturnInnerSubclassOfSupersInner.Super { + public open class Sub : test.ReturnInnerSubclassOfSupersInner.Super { public constructor Sub() public/*package*/ open inner class Inner : test.ReturnInnerSubclassOfSupersInner.Super.Inner { public/*package*/ constructor Inner() - public/*package*/ open override /*1*/ fun get(): test.ReturnInnerSubclassOfSupersInner.Sub? + public/*package*/ open override /*1*/ fun get(): test.ReturnInnerSubclassOfSupersInner.Sub! } } @@ -16,7 +16,7 @@ public trait ReturnInnerSubclassOfSupersInner { public/*package*/ open inner class Inner { public/*package*/ constructor Inner() - public/*package*/ open fun get(): test.ReturnInnerSubclassOfSupersInner.Super? + public/*package*/ open fun get(): test.ReturnInnerSubclassOfSupersInner.Super! } } } diff --git a/compiler/testData/loadJava/sourceJava/ReturnNotSubtype.txt b/compiler/testData/loadJava/sourceJava/ReturnNotSubtype.txt index bd9e800a33b..f1ea009fb47 100644 --- a/compiler/testData/loadJava/sourceJava/ReturnNotSubtype.txt +++ b/compiler/testData/loadJava/sourceJava/ReturnNotSubtype.txt @@ -2,21 +2,21 @@ package test public trait ReturnNotSubtype { - public trait Sub : test.ReturnNotSubtype.Super { + public trait Sub : test.ReturnNotSubtype.Super { public abstract override /*1*/ fun _void(): kotlin.Boolean - public abstract override /*1*/ fun array(): kotlin.Array? - public abstract override /*1*/ fun klass(): java.lang.Class? + public abstract override /*1*/ fun array(): kotlin.Array<(out) java.lang.Void!>! + public abstract override /*1*/ fun klass(): java.lang.Class! public abstract override /*1*/ fun string1(): kotlin.Unit - public abstract override /*1*/ fun string2(): kotlin.MutableList? - public abstract override /*1*/ fun t(): java.lang.Void? + public abstract override /*1*/ fun string2(): kotlin.(Mutable)List! + public abstract override /*1*/ fun t(): java.lang.Void! } public trait Super { public abstract fun _void(): kotlin.Unit - public abstract fun array(): kotlin.Array? - public abstract fun klass(): java.lang.Class? - public abstract fun string1(): kotlin.String? - public abstract fun string2(): kotlin.String? - public abstract fun t(): T? + public abstract fun array(): kotlin.Array<(out) T!>! + public abstract fun klass(): java.lang.Class! + public abstract fun string1(): kotlin.String! + public abstract fun string2(): kotlin.String! + public abstract fun t(): T! } } diff --git a/compiler/testData/loadJava/sourceJava/WrongNumberOfGenericParameters.txt b/compiler/testData/loadJava/sourceJava/WrongNumberOfGenericParameters.txt index fb84f13498a..573f78e5212 100644 --- a/compiler/testData/loadJava/sourceJava/WrongNumberOfGenericParameters.txt +++ b/compiler/testData/loadJava/sourceJava/WrongNumberOfGenericParameters.txt @@ -1,10 +1,10 @@ package test public trait WrongNumberOfGenericParameters { - public abstract fun o0(): test.WrongNumberOfGenericParameters.One? - public abstract fun o2(): test.WrongNumberOfGenericParameters.One<[ERROR : T]>? - public abstract fun t1(): test.WrongNumberOfGenericParameters.Two? - public abstract fun z(): test.WrongNumberOfGenericParameters.Zero? + public abstract fun o0(): test.WrongNumberOfGenericParameters.One! + public abstract fun o2(): test.WrongNumberOfGenericParameters.One<[ERROR : T]>! + public abstract fun t1(): test.WrongNumberOfGenericParameters.Two! + public abstract fun z(): test.WrongNumberOfGenericParameters.Zero! public trait One { } diff --git a/idea/testData/completion/handlers/smart/JavaStaticMethodInsertsImport.kt b/idea/testData/completion/handlers/smart/JavaStaticMethodInsertsImport.kt index 51eeb116939..2b79d4c6de3 100644 --- a/idea/testData/completion/handlers/smart/JavaStaticMethodInsertsImport.kt +++ b/idea/testData/completion/handlers/smart/JavaStaticMethodInsertsImport.kt @@ -2,4 +2,4 @@ fun foo(){ val l : java.util.Calendar = } -// ELEMENT_TEXT: Calendar.getInstance(TimeZone) +// ELEMENT_TEXT: Calendar.getInstance(TimeZone!) diff --git a/idea/testData/completion/handlers/smart/JavaStaticMethodInsertsImport.kt.after b/idea/testData/completion/handlers/smart/JavaStaticMethodInsertsImport.kt.after index d284b984955..8309bfd4595 100644 --- a/idea/testData/completion/handlers/smart/JavaStaticMethodInsertsImport.kt.after +++ b/idea/testData/completion/handlers/smart/JavaStaticMethodInsertsImport.kt.after @@ -4,4 +4,4 @@ fun foo(){ val l : java.util.Calendar = Calendar.getInstance() } -// ELEMENT_TEXT: Calendar.getInstance(TimeZone) +// ELEMENT_TEXT: Calendar.getInstance(TimeZone!) diff --git a/idea/testData/completion/smart/JavaStaticFields.kt b/idea/testData/completion/smart/JavaStaticFields.kt index 4d6d8c2e03c..b35b2c543b8 100644 --- a/idea/testData/completion/smart/JavaStaticFields.kt +++ b/idea/testData/completion/smart/JavaStaticFields.kt @@ -2,5 +2,5 @@ fun foo(){ var l : java.util.Locale = } -// EXIST: { lookupString:"Locale.ENGLISH", itemText:"Locale.ENGLISH", tailText:" (java.util)", typeText:"Locale" } -// EXIST: { lookupString:"Locale.FRENCH", itemText:"Locale.FRENCH", tailText:" (java.util)", typeText:"Locale" } +// EXIST: { lookupString:"Locale.ENGLISH", itemText:"Locale.ENGLISH", tailText:" (java.util)", typeText:"Locale!" } +// EXIST: { lookupString:"Locale.FRENCH", itemText:"Locale.FRENCH", tailText:" (java.util)", typeText:"Locale!" } diff --git a/idea/testData/completion/smart/JavaStaticFieldsForNullable.kt b/idea/testData/completion/smart/JavaStaticFieldsForNullable.kt index e0bf222b8e0..e32351ddaf2 100644 --- a/idea/testData/completion/smart/JavaStaticFieldsForNullable.kt +++ b/idea/testData/completion/smart/JavaStaticFieldsForNullable.kt @@ -2,5 +2,5 @@ fun foo(){ var l : java.util.Locale? = } -// EXIST: { lookupString:"Locale.ENGLISH", itemText:"Locale.ENGLISH", tailText:" (java.util)", typeText:"Locale" } -// EXIST: { lookupString:"Locale.FRENCH", itemText:"Locale.FRENCH", tailText:" (java.util)", typeText:"Locale" } +// EXIST: { lookupString:"Locale.ENGLISH", itemText:"Locale.ENGLISH", tailText:" (java.util)", typeText:"Locale!" } +// EXIST: { lookupString:"Locale.FRENCH", itemText:"Locale.FRENCH", tailText:" (java.util)", typeText:"Locale!" } diff --git a/idea/testData/completion/smart/JavaStaticMethods.kt b/idea/testData/completion/smart/JavaStaticMethods.kt index c5806450884..89dd605ab36 100644 --- a/idea/testData/completion/smart/JavaStaticMethods.kt +++ b/idea/testData/completion/smart/JavaStaticMethods.kt @@ -2,6 +2,6 @@ fun foo(){ val l : java.util.Calendar = } -// EXIST: { lookupString:"Calendar.getInstance", itemText:"Calendar.getInstance()", tailText:" (java.util)", typeText:"Calendar" } -// EXIST: { lookupString:"Calendar.getInstance", itemText:"Calendar.getInstance(TimeZone)", tailText:" (java.util)", typeText:"Calendar" } -// EXIST: { lookupString:"Calendar.getInstance", itemText:"Calendar.getInstance(TimeZone, Locale)", tailText:" (java.util)", typeText:"Calendar" } +// EXIST: { lookupString:"Calendar.getInstance", itemText:"Calendar.getInstance()", tailText:" (java.util)", typeText:"Calendar!" } +// EXIST: { lookupString:"Calendar.getInstance", itemText:"Calendar.getInstance(TimeZone!)", tailText:" (java.util)", typeText:"Calendar!" } +// EXIST: { lookupString:"Calendar.getInstance", itemText:"Calendar.getInstance(TimeZone!, Locale!)", tailText:" (java.util)", typeText:"Calendar!" } diff --git a/idea/testData/debugger/tinyApp/src/evaluate/multipleBreakpoints/exceptions.kt b/idea/testData/debugger/tinyApp/src/evaluate/multipleBreakpoints/exceptions.kt index deb56b87e41..64275d5f9a8 100644 --- a/idea/testData/debugger/tinyApp/src/evaluate/multipleBreakpoints/exceptions.kt +++ b/idea/testData/debugger/tinyApp/src/evaluate/multipleBreakpoints/exceptions.kt @@ -37,7 +37,7 @@ fun genericClassCast() { val c = ArrayList() c.add(1) // EXPRESSION: c.get(0) - // RESULT: 1: I + // RESULT: instance of java.lang.Integer(id=ID): Ljava/lang/Integer; //Breakpoint! val b = 1 } @@ -46,7 +46,7 @@ fun genericClassCast() { val c = ArrayList() c.add("a") // EXPRESSION: c.get(0) - // RESULT: java.lang.ClassCastException: java.lang.String cannot be cast to java.lang.Number: Ljava/lang/ClassCastException; + // RESULT: java.lang.ClassCastException: java.lang.String cannot be cast to java.lang.Integer: Ljava/lang/ClassCastException; //Breakpoint! val b = 1 } diff --git a/idea/testData/editor/quickDoc/JavaClassUsedInKotlin.kt b/idea/testData/editor/quickDoc/JavaClassUsedInKotlin.kt index 3ae4d72615a..ab68212b151 100644 --- a/idea/testData/editor/quickDoc/JavaClassUsedInKotlin.kt +++ b/idea/testData/editor/quickDoc/JavaClassUsedInKotlin.kt @@ -2,4 +2,4 @@ fun testing() { SomeClass>() } -// INFO: public constructor SomeClass<T : List<Any?>?>()
Java declaration:
[light_idea_test_case] public class SomeClass<T extends java.util.List> extends Object \ No newline at end of file +// INFO: public constructor SomeClass<T : (MutableList<out Any?>..List<Any?>?)>()
Java declaration:
[light_idea_test_case] public class SomeClass<T extends java.util.List> extends Object \ No newline at end of file diff --git a/idea/testData/editor/quickDoc/JavaMethodUsedInKotlin.kt b/idea/testData/editor/quickDoc/JavaMethodUsedInKotlin.kt index 9020cdda241..7c71d064bcd 100644 --- a/idea/testData/editor/quickDoc/JavaMethodUsedInKotlin.kt +++ b/idea/testData/editor/quickDoc/JavaMethodUsedInKotlin.kt @@ -2,4 +2,4 @@ fun ktTest() { Test.foo("SomeTest") } -// INFO: public open fun foo(param: String): Array<out Any>
Java declaration:
Test... \ No newline at end of file +// INFO: public open fun foo(param: String!): (Array<Any!>..Array<out Any!>?)
Java declaration:
Test... \ No newline at end of file diff --git a/idea/testData/intentions/specifyType/loopParameter.kt.after b/idea/testData/intentions/specifyType/loopParameter.kt.after index 32f4f937299..a0d6772e37e 100644 --- a/idea/testData/intentions/specifyType/loopParameter.kt.after +++ b/idea/testData/intentions/specifyType/loopParameter.kt.after @@ -3,7 +3,7 @@ import java.util.HashMap fun foo(map : HashMap) { - for (entry: MutableMap.MutableEntry in map.entrySet()) { + for (entry: MutableMap.MutableEntry? in map.entrySet()) { } } \ No newline at end of file diff --git a/idea/testData/quickfix/changeSignature/beforeAddParameterNotAvailableForLibrary.kt b/idea/testData/quickfix/changeSignature/beforeAddParameterNotAvailableForLibrary.kt index b1fb7027917..36f062be3f8 100644 --- a/idea/testData/quickfix/changeSignature/beforeAddParameterNotAvailableForLibrary.kt +++ b/idea/testData/quickfix/changeSignature/beforeAddParameterNotAvailableForLibrary.kt @@ -1,5 +1,5 @@ // "class org.jetbrains.jet.plugin.quickfix.AddFunctionParametersFix" "false" -// ERROR: Too many arguments for public open fun equals(other: kotlin.Any?): kotlin.Boolean defined in java.lang.Object +// ERROR: Too many arguments for public open fun equals(other: kotlin.Any!): kotlin.Boolean defined in java.lang.Object fun f(d: java.lang.Object) { d.equals("a", "b") diff --git a/idea/testData/structureView/fileStructure/InheritedJavaMembers.after b/idea/testData/structureView/fileStructure/InheritedJavaMembers.after index 00d64237199..661cb72526e 100644 --- a/idea/testData/structureView/fileStructure/InheritedJavaMembers.after +++ b/idea/testData/structureView/fileStructure/InheritedJavaMembers.after @@ -1,6 +1,6 @@ -InheritedJavaMembers.kt -InheritedJavaMembers - call(): String? location=→Callable + call(): String! location=→Callable equals(Any?): Boolean location=→Any hashCode(): Int location=→Any test(): Unit diff --git a/idea/testData/structureView/fileStructure/InheritedSAMConversion.after b/idea/testData/structureView/fileStructure/InheritedSAMConversion.after index 476e8a12679..fbc1ffa3887 100644 --- a/idea/testData/structureView/fileStructure/InheritedSAMConversion.after +++ b/idea/testData/structureView/fileStructure/InheritedSAMConversion.after @@ -1,6 +1,6 @@ -InheritedSAMConversion.kt -KotlinTest equals(Any?): Boolean location=→Any - foo((() -> Unit)?): Unit + foo((() -> Unit)!): Unit hashCode(): Int location=→Any toString(): String location=→Any diff --git a/j2k/tests/testData/ast/annotations/jetbrainsNotNull.java b/j2k/tests/testData/ast/annotations/jetbrainsNotNull.java index 719ea5ddece..72a40a5f4de 100644 --- a/j2k/tests/testData/ast/annotations/jetbrainsNotNull.java +++ b/j2k/tests/testData/ast/annotations/jetbrainsNotNull.java @@ -12,6 +12,7 @@ public class Test { } public void sout(@NotNull String str) { + // UNNECESSARY_NOT_NULL_ASSERTION heuristic does not work any more, instead we can skip generating !! altogether System.out.println(str); } diff --git a/j2k/tests/testData/ast/annotations/jetbrainsNotNull.kt b/j2k/tests/testData/ast/annotations/jetbrainsNotNull.kt index 36d5b9672a2..cbe76060c10 100644 --- a/j2k/tests/testData/ast/annotations/jetbrainsNotNull.kt +++ b/j2k/tests/testData/ast/annotations/jetbrainsNotNull.kt @@ -10,7 +10,8 @@ public class Test(str: String) { } public fun sout(str: String) { - System.out.println(str) + // UNNECESSARY_NOT_NULL_ASSERTION heuristic does not work any more, instead we can skip generating !! altogether + System.out!!.println(str) } public fun dummy(str: String): String {