[FIR] Render dot-separated FQNs instead of slash-separated ones in diagnostics

^KT-62030 fixed
This commit is contained in:
Ilya Kirillov
2023-09-21 20:19:46 +02:00
committed by Space Team
parent b119b4de02
commit d98da87278
92 changed files with 146 additions and 130 deletions
@@ -28,4 +28,4 @@ KtErrorCallInfo:
callableIdIfNonLocal = null)
}
]
diagnostic = ERROR<ARGUMENT_TYPE_MISMATCH: Argument type mismatch: actual type is 'kotlin/String', but 'kotlin/Int' was expected.>
diagnostic = ERROR<ARGUMENT_TYPE_MISMATCH: Argument type mismatch: actual type is 'kotlin.String', but 'kotlin.Int' was expected.>
@@ -1,5 +1,5 @@
KtInapplicableCallCandidateInfo:
diagnostic = ERROR<ARGUMENT_TYPE_MISMATCH: Argument type mismatch: actual type is 'kotlin/Int', but 'kotlin/Char' was expected.>
diagnostic = ERROR<ARGUMENT_TYPE_MISMATCH: Argument type mismatch: actual type is 'kotlin.Int', but 'kotlin.Char' was expected.>
candidate = KtSimpleFunctionCall:
isImplicitInvoke = false
partiallyAppliedSymbol = KtPartiallyAppliedSymbol:
@@ -30,7 +30,7 @@ KtInapplicableCallCandidateInfo:
isInBestCandidates = true
KtInapplicableCallCandidateInfo:
diagnostic = ERROR<ARGUMENT_TYPE_MISMATCH: Argument type mismatch: actual type is 'kotlin/Int', but 'kotlin/Boolean' was expected.>
diagnostic = ERROR<ARGUMENT_TYPE_MISMATCH: Argument type mismatch: actual type is 'kotlin.Int', but 'kotlin.Boolean' was expected.>
candidate = KtSimpleFunctionCall:
isImplicitInvoke = false
partiallyAppliedSymbol = KtPartiallyAppliedSymbol:
@@ -61,7 +61,7 @@ KtInapplicableCallCandidateInfo:
isInBestCandidates = true
KtInapplicableCallCandidateInfo:
diagnostic = ERROR<ARGUMENT_TYPE_MISMATCH: Argument type mismatch: actual type is 'kotlin/Int', but 'kotlin/String' was expected.>
diagnostic = ERROR<ARGUMENT_TYPE_MISMATCH: Argument type mismatch: actual type is 'kotlin.Int', but 'kotlin.String' was expected.>
candidate = KtSimpleFunctionCall:
isImplicitInvoke = false
partiallyAppliedSymbol = KtPartiallyAppliedSymbol:
@@ -1,5 +1,5 @@
KtInapplicableCallCandidateInfo:
diagnostic = ERROR<ARGUMENT_TYPE_MISMATCH: Argument type mismatch: actual type is 'kotlin/Boolean', but 'kotlin/Int' was expected.>
diagnostic = ERROR<ARGUMENT_TYPE_MISMATCH: Argument type mismatch: actual type is 'kotlin.Boolean', but 'kotlin.Int' was expected.>
candidate = KtSimpleFunctionCall:
isImplicitInvoke = true
partiallyAppliedSymbol = KtPartiallyAppliedSymbol:
@@ -33,7 +33,7 @@ KtInapplicableCallCandidateInfo:
isInBestCandidates = false
KtInapplicableCallCandidateInfo:
diagnostic = ERROR<ARGUMENT_TYPE_MISMATCH: Argument type mismatch: actual type is 'kotlin/Boolean', but 'kotlin/Char' was expected.>
diagnostic = ERROR<ARGUMENT_TYPE_MISMATCH: Argument type mismatch: actual type is 'kotlin.Boolean', but 'kotlin.Char' was expected.>
candidate = KtSimpleFunctionCall:
isImplicitInvoke = false
partiallyAppliedSymbol = KtPartiallyAppliedSymbol:
@@ -1,5 +1,5 @@
KtInapplicableCallCandidateInfo:
diagnostic = ERROR<ARGUMENT_TYPE_MISMATCH: Argument type mismatch: actual type is 'kotlin/Int', but 'kotlin/Boolean' was expected.>
diagnostic = ERROR<ARGUMENT_TYPE_MISMATCH: Argument type mismatch: actual type is 'kotlin.Int', but 'kotlin.Boolean' was expected.>
candidate = KtSimpleFunctionCall:
isImplicitInvoke = false
partiallyAppliedSymbol = KtPartiallyAppliedSymbol:
@@ -1,5 +1,5 @@
KtInapplicableCallCandidateInfo:
diagnostic = ERROR<ARGUMENT_TYPE_MISMATCH: Argument type mismatch: actual type is 'kotlin/Int', but 'kotlin/String' was expected.>
diagnostic = ERROR<ARGUMENT_TYPE_MISMATCH: Argument type mismatch: actual type is 'kotlin.Int', but 'kotlin.String' was expected.>
candidate = KtDelegatedConstructorCall:
kind = SUPER_CALL
partiallyAppliedSymbol = KtPartiallyAppliedSymbol:
@@ -16,7 +16,7 @@ Tower Data Context:
Element 7
Implicit receiver:
FirRegularClassSymbol public final companion object Companion : R|kotlin/Any|
Type: kotlin/Enum.Companion
Type: kotlin.Enum.Companion
Element 8
Scope: FirNestedClassifierScopeWithSubstitution
Classifiers:
@@ -78,4 +78,4 @@ FILE: [ResolvedTo(IMPORTS)] enumValue.kt
public final static [ResolvedTo(STATUS)] val entries: R|kotlin/enums/EnumEntries<Direction>|
public [ResolvedTo(STATUS)] get(): R|kotlin/enums/EnumEntries<Direction>|
}
}
@@ -18,7 +18,7 @@ Tower Data Context:
Element 8
Implicit receiver:
FirNamedFunctionSymbol public final fun R|kotlin/String|.test(): R|kotlin/Unit|
Type: kotlin/String
Type: kotlin.String
Element 9
Scope: FirLocalScope
@@ -22,7 +22,7 @@ Tower Data Context:
Element 10
Implicit receiver:
FirAnonymousFunctionSymbol foo@fun R|kotlin/String|.<anonymous>(): R|kotlin/Unit| <inline=NoInline>
Type: kotlin/String
Type: kotlin.String
Element 11
Scope: FirLocalScope
Element 12
@@ -30,7 +30,7 @@ Tower Data Context:
Element 13
Implicit receiver:
FirAnonymousFunctionSymbol num@fun R|kotlin/Int|.<anonymous>(): R|kotlin/Unit| <inline=NoInline>
Type: kotlin/Int
Type: kotlin.Int
Element 14
Scope: FirLocalScope
@@ -24,7 +24,7 @@ Tower Data Context:
Element 9
Implicit receiver:
FirRegularClassSymbol public final class Foo<F> : R|kotlin/Any|
Type: test/Foo<F>
Type: test.Foo<F>
Element 10
Scope: FirMemberTypeParameterScope
Classifiers:
@@ -32,7 +32,7 @@ Tower Data Context:
Element 11
Implicit receiver:
FirRegularClassSymbol public final inner class Bar<B, Outer(F)> : R|kotlin/Any|
Type: test/Foo.Bar<B, F>
Type: test.Foo.Bar<B, F>
Element 12
Scope: FirLocalScope
Properties:
@@ -22,7 +22,7 @@ Tower Data Context:
Element 9
Implicit receiver:
FirRegularClassSymbol local final class Local : R|kotlin/Any|
Type: <local>/Local
Type: <local>.Local
Element 10
Scope: FirLocalScope
Element 11
@@ -42,4 +42,4 @@ FILE: [ResolvedTo(IMPORTS)] localClass.kt
}
R|<local>/Local.Local|().R|<local>/foo|()
}
}
@@ -24,7 +24,7 @@ Tower Data Context:
Element 9
Implicit receiver:
FirRegularClassSymbol public final class Bar<B> : R|kotlin/Any|
Type: test/Foo.Bar<B>
Type: test.Foo.Bar<B>
Element 10
Scope: FirLocalScope
Properties:
@@ -16,7 +16,7 @@ Tower Data Context:
Element 7
Implicit receiver:
FirRegularClassSymbol public final class Foo : R|kotlin/Any|
Type: test/Foo
Type: test.Foo
Element 8
Scope: FirLocalScope
Properties:
@@ -40,4 +40,4 @@ FILE: [ResolvedTo(IMPORTS)] propertyDelegateInitializer.kt
^ this@R|test/Foo|.D|test/Foo.property|.R|test/MyInterface.getValue|(this@R|test/Foo|, ::R|test/Foo.property|)
}
}
}
@@ -50,7 +50,7 @@ Tower Data Context:
public? get(): <implicit>
public? final? class After_OtherClass : R|kotlin/Any|
Type: kotlin/script/templates/standard/ScriptTemplateWithArgs
Type: kotlin.script.templates.standard.ScriptTemplateWithArgs
Label: <script>
Element 10
Implicit receiver:
@@ -50,7 +50,7 @@ Tower Data Context:
public? get(): <implicit>
public? final? class After_OtherClass : R|kotlin/Any|
Type: kotlin/script/templates/standard/ScriptTemplateWithArgs
Type: kotlin.script.templates.standard.ScriptTemplateWithArgs
Label: <script>
Element 10
Scope: FirLocalScope
@@ -51,7 +51,7 @@ Tower Data Context:
public get(): R|kotlin/Int|
public final class After_OtherClass : R|kotlin/Any|
Type: kotlin/script/templates/standard/ScriptTemplateWithArgs
Type: kotlin.script.templates.standard.ScriptTemplateWithArgs
Label: <script>
FILE: [ResolvedTo(IMPORTS)] topLevel.kts
@@ -16,7 +16,7 @@ Tower Data Context:
Element 7
Implicit receiver:
FirRegularClassSymbol public final class Foo : R|kotlin/Any|
Type: foo/Foo
Type: foo.Foo
Element 8
Scope: FirLocalScope
Properties:
@@ -24,7 +24,7 @@ Tower Data Context:
Smart Casts:
FirPropertySymbol lvar current: R|Node?|
Types:
kotlin/Any
kotlin.Any
FILE: [ResolvedTo(IMPORTS)] afterLoop.kt
public abstract [ResolvedTo(STATUS)] interface Node : R|kotlin/Any| {
@@ -23,7 +23,7 @@ Smart Casts:
FirValueParameterSymbol obj: R|kotlin/Any|
Types:
Foo
kotlin/Any
kotlin.Any
FILE: [ResolvedTo(IMPORTS)] andRight.kt
public abstract [ResolvedTo(STATUS)] interface Foo : R|kotlin/Any| {
@@ -40,4 +40,4 @@ FILE: [ResolvedTo(IMPORTS)] andRight.kt
}
public final [ResolvedTo(CONTRACTS)] fun consume([ResolvedTo(CONTRACTS)] obj: R|Foo|): R|kotlin/Unit| {
}
}
@@ -25,7 +25,7 @@ Smart Casts:
FirValueParameterSymbol obj: R|kotlin/Any|
Types:
Foo
kotlin/Any
kotlin.Any
FILE: [ResolvedTo(IMPORTS)] argument.kt
public abstract [ResolvedTo(STATUS)] interface Foo : R|kotlin/Any| {
@@ -27,7 +27,7 @@ Smart Casts:
FirValueParameterSymbol obj: R|kotlin/Any|
Types:
Foo
kotlin/Any
kotlin.Any
Bar
FILE: [ResolvedTo(IMPORTS)] argumentAsReceiver.kt
@@ -27,7 +27,7 @@ Smart Casts:
FirRegularClassSymbol public open class Foo : R|kotlin/Any|
Types:
Bar
kotlin/Any
kotlin.Any
FILE: [ResolvedTo(IMPORTS)] dispatchReceiver.kt
public open [ResolvedTo(STATUS)] class Foo : R|kotlin/Any| {
@@ -27,7 +27,7 @@ Smart Casts:
FirNamedFunctionSymbol public final fun R|kotlin/Any|.test(): R|kotlin/Unit|
Types:
Foo
kotlin/Any
kotlin.Any
FILE: [ResolvedTo(IMPORTS)] extensionReceiver.kt
public abstract [ResolvedTo(STATUS)] interface Foo : R|kotlin/Any| {
@@ -28,7 +28,7 @@ Tower Data Context:
Smart Casts:
FirValueParameterSymbol param: R|kotlin/String?|
Types:
kotlin/Any
kotlin.Any
FILE: [ResolvedTo(IMPORTS)] insideLetOnNullableReceiver.kt
public final [ResolvedTo(BODY_RESOLVE)] fun foo([ResolvedTo(BODY_RESOLVE)] param: R|kotlin/String?|): R|kotlin/String| {
@@ -37,4 +37,4 @@ FILE: [ResolvedTo(IMPORTS)] insideLetOnNullableReceiver.kt
}
) }
^foo String()
}
}
@@ -26,7 +26,7 @@ Tower Data Context:
Smart Casts:
FirPropertySymbol lvar current: R|Node|
Types:
kotlin/Any
kotlin.Any
FILE: [ResolvedTo(IMPORTS)] insideLoop.kt
public abstract [ResolvedTo(STATUS)] interface Node : R|kotlin/Any| {
@@ -26,7 +26,7 @@ Smart Casts:
FirValueParameterSymbol obj: R|kotlin/Any|
Types:
Foo
kotlin/Any
kotlin.Any
FILE: [ResolvedTo(IMPORTS)] plainCheck.kt
public abstract [ResolvedTo(STATUS)] interface Foo : R|kotlin/Any| {
@@ -23,7 +23,7 @@ Smart Casts:
FirValueParameterSymbol obj: R|kotlin/Any|
Types:
Foo
kotlin/Any
kotlin.Any
FILE: [ResolvedTo(IMPORTS)] require.kt
public abstract [ResolvedTo(STATUS)] interface Foo : R|kotlin/Any| {
@@ -25,7 +25,7 @@ Smart Casts:
FirValueParameterSymbol obj: R|kotlin/Any|
Types:
Bar
kotlin/Any
kotlin.Any
FILE: [ResolvedTo(IMPORTS)] when.kt
public abstract [ResolvedTo(STATUS)] interface Foo : R|kotlin/Any| {
@@ -24,7 +24,7 @@ Tower Data Context:
Element 9
Implicit receiver:
FirRegularClassSymbol public final class Outer<MyParam> : R|kotlin/Any|
Type: test/Outer<MyParam>
Type: test.Outer<MyParam>
Element 10
Scope: FirMemberTypeParameterScope
Classifiers:
@@ -43,4 +43,4 @@ FILE: [ResolvedTo(IMPORTS)] declaredInClass_fromInner_typeBound.kt
}
}
}
@@ -24,13 +24,13 @@ Tower Data Context:
Element 9
Implicit receiver:
FirRegularClassSymbol public final class Outer<MyParam> : R|kotlin/Any|
Type: test/Outer<MyParam>
Type: test.Outer<MyParam>
Element 10
Scope: FirMemberTypeParameterScope
Element 11
Implicit receiver:
FirRegularClassSymbol public final inner class Inner<Outer(MyParam)> : R|kotlin/Any|
Type: test/Outer.Inner<MyParam>
Type: test.Outer.Inner<MyParam>
Element 12
Scope: FirLocalScope
Properties:
@@ -52,4 +52,4 @@ FILE: [ResolvedTo(IMPORTS)] declaredInClass_fromInner_typeRefInMember.kt
}
}
}
@@ -24,7 +24,7 @@ Tower Data Context:
Element 9
Implicit receiver:
FirRegularClassSymbol public final class Outer<MyParam> : R|kotlin/Any|
Type: test/Outer<MyParam>
Type: test.Outer<MyParam>
Element 10
Scope: FirMemberTypeParameterScope
Classifiers:
@@ -43,4 +43,4 @@ FILE: [ResolvedTo(IMPORTS)] declaredInClass_fromNested_typeBound.kt
}
}
}
@@ -20,7 +20,7 @@ Tower Data Context:
Element 8
Implicit receiver:
FirRegularClassSymbol public final class Nested : R|kotlin/Any|
Type: test/Outer.Nested
Type: test.Outer.Nested
Element 9
Scope: FirLocalScope
Properties:
@@ -30,7 +30,7 @@ Tower Data Context:
lval args: R|kotlin/Array<kotlin/String>|
public? final? class A : R|kotlin/Any|
Type: kotlin/script/templates/standard/ScriptTemplateWithArgs
Type: kotlin.script.templates.standard.ScriptTemplateWithArgs
Label: <script>
Element 10
Implicit receiver:
@@ -30,7 +30,7 @@ Tower Data Context:
lval args: R|kotlin/Array<kotlin/String>|
public? final? class A : R|kotlin/Any|
Type: kotlin/script/templates/standard/ScriptTemplateWithArgs
Type: kotlin.script.templates.standard.ScriptTemplateWithArgs
Label: <script>
Element 10
Implicit receiver:
@@ -40,5 +40,5 @@ Tower Data Context:
R|/foo|(R|/scriptFunction|(), <L> = foo@fun <anonymous>(it: R|kotlin/Int|): R|kotlin/Unit| <inline=NoInline> )
public final val $$result: R|kotlin/Int|
public get(): R|kotlin/Int|
Type: kotlin/script/templates/standard/ScriptTemplateWithArgs
Type: kotlin.script.templates.standard.ScriptTemplateWithArgs
Label: <script>
@@ -41,5 +41,5 @@ Tower Data Context:
public final fun foo(i: R|kotlin/Int|, action: R|(kotlin/Int) -> kotlin/Unit|): R|kotlin/Unit|
public final val $$result: R|kotlin/Unit|
public get(): R|kotlin/Unit|
Type: kotlin/script/templates/standard/ScriptTemplateWithArgs
Type: kotlin.script.templates.standard.ScriptTemplateWithArgs
Label: <script>
@@ -43,7 +43,7 @@ Tower Data Context:
public? final? fun foo(i: Int, action: ( (Int) -> Unit )): R|kotlin/Unit|
public final val $$result: <implicit>
public get(): <implicit>
Type: kotlin/script/templates/standard/ScriptTemplateWithArgs
Type: kotlin.script.templates.standard.ScriptTemplateWithArgs
Label: <script>
Element 10
Scope: FirLocalScope
@@ -41,7 +41,7 @@ Tower Data Context:
public final fun foo(i: R|kotlin/Int|, action: R|(kotlin/Int) -> kotlin/Unit|): R|kotlin/Unit|
public final val $$result: R|kotlin/Unit|
public get(): R|kotlin/Unit|
Type: kotlin/script/templates/standard/ScriptTemplateWithArgs
Type: kotlin.script.templates.standard.ScriptTemplateWithArgs
Label: <script>
Element 10
Scope: FirLocalScope
@@ -41,5 +41,5 @@ Tower Data Context:
public final fun foo(i: R|kotlin/Int|, action: R|(kotlin/Int) -> kotlin/Unit|): R|kotlin/Unit|
public final val $$result: R|kotlin/Unit|
public get(): R|kotlin/Unit|
Type: kotlin/script/templates/standard/ScriptTemplateWithArgs
Type: kotlin.script.templates.standard.ScriptTemplateWithArgs
Label: <script>
@@ -41,5 +41,5 @@ Tower Data Context:
public final fun foo(i: R|kotlin/Int|, action: R|(kotlin/Int) -> kotlin/Unit|): R|kotlin/Unit|
public final val $$result: R|kotlin/Unit|
public get(): R|kotlin/Unit|
Type: kotlin/script/templates/standard/ScriptTemplateWithArgs
Type: kotlin.script.templates.standard.ScriptTemplateWithArgs
Label: <script>
@@ -41,5 +41,5 @@ Tower Data Context:
public final fun foo(i: R|kotlin/Int|, action: R|(kotlin/Int) -> kotlin/Unit|): R|kotlin/Unit|
public final val $$result: R|kotlin/Unit|
public get(): R|kotlin/Unit|
Type: kotlin/script/templates/standard/ScriptTemplateWithArgs
Type: kotlin.script.templates.standard.ScriptTemplateWithArgs
Label: <script>
@@ -41,5 +41,5 @@ Tower Data Context:
public final fun foo(i: R|kotlin/Int|, action: R|(kotlin/Int) -> kotlin/Unit|): R|kotlin/Unit|
public final val $$result: R|kotlin/Unit|
public get(): R|kotlin/Unit|
Type: kotlin/script/templates/standard/ScriptTemplateWithArgs
Type: kotlin.script.templates.standard.ScriptTemplateWithArgs
Label: <script>
@@ -3,7 +3,7 @@ class C
class B
class A {
val B.foo: C.() -> Unit get() = <!NULL_FOR_NONNULL_TYPE("kotlin/Function1<C, kotlin/Unit>")!>null<!>
val B.foo: C.() -> Unit get() = <!NULL_FOR_NONNULL_TYPE("kotlin.Function1<C, kotlin.Unit>")!>null<!>
}
fun <T, R> with(arg: T, f: T.() -> R): R = arg.f()
@@ -9,5 +9,5 @@ public class Sample {
// FILE: test.kt
fun main() {
Sample.foo(<!ARGUMENT_TYPE_MISMATCH("kotlin/collections/(Mutable)List<kotlin/collections/(Mutable)List<kotlin/String!>!>!; kotlin/String")!>"123"<!>)
Sample.foo(<!ARGUMENT_TYPE_MISMATCH("kotlin.collections.(Mutable)List<kotlin.collections.(Mutable)List<kotlin.String!>!>!; kotlin.String")!>"123"<!>)
}
@@ -0,0 +1,19 @@
/*
* Copyright 2010-2022 JetBrains s.r.o. and Kotlin Programming Language contributors.
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
*/
package org.jetbrains.kotlin.fir.renderer
import org.jetbrains.kotlin.name.CallableId
import org.jetbrains.kotlin.name.ClassId
class ConeIdRendererForDiagnostics : ConeIdRenderer() {
override fun renderClassId(classId: ClassId) {
builder.append(classId.asFqNameString())
}
override fun renderCallableId(callableId: CallableId) {
builder.append(callableId.asSingleFqName().asString())
}
}
@@ -38,7 +38,7 @@ class ConeTypeRendererForReadability(
return "$lowerRendered!"
}
val kotlinCollectionsPrefix = StandardNames.COLLECTIONS_PACKAGE_FQ_NAME.asString().replace(".", "/") + "/"
val kotlinCollectionsPrefix = StandardNames.COLLECTIONS_PACKAGE_FQ_NAME.asString() + "."
val mutablePrefix = "Mutable"
// java.util.List<Foo> -> (Mutable)List<Foo!>!
val simpleCollection = replacePrefixesInTypeRepresentations(
@@ -59,7 +59,7 @@ class ConeTypeRendererForReadability(
)
if (mutableEntry != null) return mutableEntry
val kotlinPrefix = StandardNames.BUILT_INS_PACKAGE_FQ_NAME.asString() + "/"
val kotlinPrefix = StandardNames.BUILT_INS_PACKAGE_FQ_NAME.asString() + "."
// Foo[] -> Array<(out) Foo!>!
val array = replacePrefixesInTypeRepresentations(
lowerRendered = lowerRendered,
@@ -5,10 +5,7 @@
package org.jetbrains.kotlin.fir.types
import org.jetbrains.kotlin.fir.renderer.ConeIdRendererForDebugging
import org.jetbrains.kotlin.fir.renderer.ConeIdShortRenderer
import org.jetbrains.kotlin.fir.renderer.ConeTypeRendererForDebugging
import org.jetbrains.kotlin.fir.renderer.ConeTypeRendererForReadability
import org.jetbrains.kotlin.fir.renderer.*
import org.jetbrains.kotlin.fir.types.impl.ConeClassLikeTypeImpl
import org.jetbrains.kotlin.name.ClassId
import org.jetbrains.kotlin.types.Variance
@@ -127,7 +124,7 @@ fun ConeKotlinType.renderReadable(): String {
fun ConeKotlinType.renderReadableWithFqNames(): String {
val builder = StringBuilder()
ConeTypeRendererForReadability(builder) { ConeIdRendererForDebugging() }.render(this)
ConeTypeRendererForReadability(builder) { ConeIdRendererForDiagnostics() }.render(this)
return builder.toString()
}
+1 -1
View File
@@ -1,4 +1,4 @@
compiler/testData/cli/jvm/compatqualUsage.kt:2:11: error: null cannot be a value of a non-null type 'kotlin/String'.
compiler/testData/cli/jvm/compatqualUsage.kt:2:11: error: null cannot be a value of a non-null type 'kotlin.String'.
b.foo(null)
^
COMPILATION_ERROR
+1 -1
View File
@@ -1,4 +1,4 @@
compiler/testData/cli/jvm/compatqualUsage.kt:2:11: error: null cannot be a value of a non-null type 'kotlin/String'.
compiler/testData/cli/jvm/compatqualUsage.kt:2:11: error: null cannot be a value of a non-null type 'kotlin.String'.
b.foo(null)
^
COMPILATION_ERROR
+1 -1
View File
@@ -1,4 +1,4 @@
compiler/testData/cli/jvm/conflictingProjection.kt:10:19: error: projection is conflicting with variance of the corresponding type parameter of 'Out<in kotlin/Int>'. Remove the projection or replace it with '*'.
compiler/testData/cli/jvm/conflictingProjection.kt:10:19: error: projection is conflicting with variance of the corresponding type parameter of 'Out<in kotlin.Int>'. Remove the projection or replace it with '*'.
fun a8(value: Out<in Int>) {}
^
compiler/testData/cli/jvm/conflictingProjection.kt:17:15: error: variance annotations are only allowed for type parameters of classes and interfaces.
@@ -1,7 +1,7 @@
compiler/testData/cli/jvm/firFriendlyErrorIfNoJdkOptionIsSet.kt:2:11: error: unresolved reference 'NullPointerException'.
throw NullPointerException()
^
compiler/testData/cli/jvm/firFriendlyErrorIfNoJdkOptionIsSet.kt:2:11: error: type mismatch: inferred type is 'ERROR CLASS: Unresolved name: NullPointerException', but 'kotlin/Throwable' was expected.
compiler/testData/cli/jvm/firFriendlyErrorIfNoJdkOptionIsSet.kt:2:11: error: type mismatch: inferred type is 'ERROR CLASS: Unresolved name: NullPointerException', but 'kotlin.Throwable' was expected.
throw NullPointerException()
^
COMPILATION_ERROR
+1 -1
View File
@@ -7,7 +7,7 @@ compiler/testData/cli/jvm/firLightTree.kt:3:15: error: classifier 'class System
compiler/testData/cli/jvm/firLightTree.kt:3:15: error: variable expected.
java.lang.System = null
^
compiler/testData/cli/jvm/firLightTree.kt:3:24: error: null cannot be a value of a non-null type 'kotlin/Unit'.
compiler/testData/cli/jvm/firLightTree.kt:3:24: error: null cannot be a value of a non-null type 'kotlin.Unit'.
java.lang.System = null
^
COMPILATION_ERROR
+1 -1
View File
@@ -7,7 +7,7 @@ compiler/testData/cli/jvm/firLightTree.kt:3:15: error: classifier 'class System
compiler/testData/cli/jvm/firLightTree.kt:3:15: error: variable expected.
java.lang.System = null
^
compiler/testData/cli/jvm/firLightTree.kt:3:24: error: null cannot be a value of a non-null type 'kotlin/Unit'.
compiler/testData/cli/jvm/firLightTree.kt:3:24: error: null cannot be a value of a non-null type 'kotlin.Unit'.
java.lang.System = null
^
COMPILATION_ERROR
@@ -10,7 +10,7 @@ compiler/testData/cli/jvm/instanceAccessBeforeSuperCall.kt:2:74: error: cannot a
compiler/testData/cli/jvm/instanceAccessBeforeSuperCall.kt:7:20: error: 'this' is not defined in this context.
class B(other: B = this)
^
compiler/testData/cli/jvm/instanceAccessBeforeSuperCall.kt:10:32: error: argument type mismatch: actual type is 'kotlin/Function0<ERROR CLASS: Unknown return lambda parameter type>', but 'kotlin/Int' was expected.
compiler/testData/cli/jvm/instanceAccessBeforeSuperCall.kt:10:32: error: argument type mismatch: actual type is 'kotlin.Function0<ERROR CLASS: Unknown return lambda parameter type>', but 'kotlin.Int' was expected.
constructor(x: Int) : this({
^
compiler/testData/cli/jvm/instanceAccessBeforeSuperCall.kt:12:9: error: cannot access '<this>' before the instance has been initialized.
+1 -1
View File
@@ -1,4 +1,4 @@
compiler/testData/cli/jvm/jspecifyUsage.kt:2:11: error: null cannot be a value of a non-null type 'kotlin/String'.
compiler/testData/cli/jvm/jspecifyUsage.kt:2:11: error: null cannot be a value of a non-null type 'kotlin.String'.
a.foo(null)
^
COMPILATION_ERROR
+1 -1
View File
@@ -1,4 +1,4 @@
compiler/testData/cli/jvm/jspecifyUsage.kt:2:11: error: null cannot be a value of a non-null type 'kotlin/String'.
compiler/testData/cli/jvm/jspecifyUsage.kt:2:11: error: null cannot be a value of a non-null type 'kotlin.String'.
a.foo(null)
^
COMPILATION_ERROR
+1 -1
View File
@@ -1,4 +1,4 @@
compiler/testData/cli/jvm/jsr305DefaultMigration.kt:2:19: error: null cannot be a value of a non-null type 'kotlin/String'.
compiler/testData/cli/jvm/jsr305DefaultMigration.kt:2:19: error: null cannot be a value of a non-null type 'kotlin.String'.
annotated.foo(null)
^
COMPILATION_ERROR
+1 -1
View File
@@ -1,6 +1,6 @@
warning: argument -Xjsr305-annotations is deprecated. Please use -Xjsr305 instead
warning: option 'enable' for -Xjsr305 flag is deprecated. Please use 'strict' instead
compiler/testData/cli/jvm/jsr305Usage.kt:2:11: error: null cannot be a value of a non-null type 'kotlin/String'.
compiler/testData/cli/jvm/jsr305Usage.kt:2:11: error: null cannot be a value of a non-null type 'kotlin.String'.
a.foo(null)
^
COMPILATION_ERROR
+1 -1
View File
@@ -1,4 +1,4 @@
compiler/testData/cli/jvm/jsr305Migration.kt:3:19: error: null cannot be a value of a non-null type 'kotlin/String'.
compiler/testData/cli/jvm/jsr305Migration.kt:3:19: error: null cannot be a value of a non-null type 'kotlin.String'.
annotated.bar(null)
^
COMPILATION_ERROR
+2 -2
View File
@@ -1,7 +1,7 @@
compiler/testData/cli/jvm/jsr305Migration.kt:2:19: error: null cannot be a value of a non-null type 'kotlin/String'.
compiler/testData/cli/jvm/jsr305Migration.kt:2:19: error: null cannot be a value of a non-null type 'kotlin.String'.
annotated.foo(null)
^
compiler/testData/cli/jvm/jsr305Migration.kt:3:19: error: null cannot be a value of a non-null type 'kotlin/String'.
compiler/testData/cli/jvm/jsr305Migration.kt:3:19: error: null cannot be a value of a non-null type 'kotlin.String'.
annotated.bar(null)
^
COMPILATION_ERROR
+1 -1
View File
@@ -1,4 +1,4 @@
compiler/testData/cli/jvm/jsr305Migration.kt:3:19: error: null cannot be a value of a non-null type 'kotlin/String'.
compiler/testData/cli/jvm/jsr305Migration.kt:3:19: error: null cannot be a value of a non-null type 'kotlin.String'.
annotated.bar(null)
^
COMPILATION_ERROR
+1 -1
View File
@@ -1,4 +1,4 @@
compiler/testData/cli/jvm/jsr305Usage.kt:2:11: error: null cannot be a value of a non-null type 'kotlin/String'.
compiler/testData/cli/jvm/jsr305Usage.kt:2:11: error: null cannot be a value of a non-null type 'kotlin.String'.
a.foo(null)
^
COMPILATION_ERROR
+1 -1
View File
@@ -1,4 +1,4 @@
compiler/testData/cli/jvm/severalAnnotations.kt:2:11: error: null cannot be a value of a non-null type 'kotlin/String'.
compiler/testData/cli/jvm/severalAnnotations.kt:2:11: error: null cannot be a value of a non-null type 'kotlin.String'.
a.foo(null)
^
COMPILATION_ERROR
@@ -1,4 +1,4 @@
compiler/testData/cli/jvm/reportInternalDiagnosticNames.kt:2:21: error: [INITIALIZER_TYPE_MISMATCH] Initializer type mismatch: expected 'kotlin/String', actual 'kotlin/Int'.
compiler/testData/cli/jvm/reportInternalDiagnosticNames.kt:2:21: error: [INITIALIZER_TYPE_MISMATCH] Initializer type mismatch: expected 'kotlin.String', actual 'kotlin.Int'.
val x: String = 1
^
compiler/testData/cli/jvm/reportInternalDiagnosticNames.kt:3:1: error: [NO_RETURN_IN_FUNCTION_WITH_BLOCK_BODY] A 'return' expression is required in a function with a block body ('{...}').
+1 -1
View File
@@ -1,4 +1,4 @@
compiler/testData/cli/jvm/werrorWithExplicitError.kt:4:6: error: only safe (?.) or non-null asserted (!!.) calls are allowed on a nullable receiver of type 'kotlin/String?'.
compiler/testData/cli/jvm/werrorWithExplicitError.kt:4:6: error: only safe (?.) or non-null asserted (!!.) calls are allowed on a nullable receiver of type 'kotlin.String?'.
t.length
^
COMPILATION_ERROR
@@ -9,5 +9,5 @@ class Foo(val a: Int, b: Int) {
val e: Int
get() = <!UNRESOLVED_REFERENCE!>b<!>
val map: Map<String, Int> = <!INITIALIZER_TYPE_MISMATCH, TYPE_MISMATCH("kotlin/String; kotlin/Int"), TYPE_MISMATCH("kotlin/String; kotlin/Int"), TYPE_MISMATCH("kotlin/Int; kotlin/String"), TYPE_MISMATCH("kotlin/String; kotlin/Int"), TYPE_MISMATCH("kotlin/Int; kotlin/String")!>mapOf(1 to "hello")<!>
val map: Map<String, Int> = <!INITIALIZER_TYPE_MISMATCH, TYPE_MISMATCH("kotlin.String; kotlin.Int"), TYPE_MISMATCH("kotlin.String; kotlin.Int"), TYPE_MISMATCH("kotlin.Int; kotlin.String"), TYPE_MISMATCH("kotlin.String; kotlin.Int"), TYPE_MISMATCH("kotlin.Int; kotlin.String")!>mapOf(1 to "hello")<!>
}
@@ -12,14 +12,14 @@ annotation class Ann
fun <@Ann R : @Ann Any> f3(a: Array<@Ann R>): Array<@Ann R?> = null!!
fun test2(a: @Ann Array<in @Ann Int>) {
val r: Array<in Int?> = f3(<!ARGUMENT_TYPE_MISMATCH("kotlin/Array<@Ann() R>; @Ann() kotlin/Array<CapturedType(in @Ann() kotlin/Int)>")!>a<!>)
val r: Array<in Int?> = f3(<!ARGUMENT_TYPE_MISMATCH("kotlin.Array<@Ann() R>; @Ann() kotlin.Array<CapturedType(in @Ann() kotlin.Int)>")!>a<!>)
}
var test3: Int = 0
set(s: <!WRONG_SETTER_PARAMETER_TYPE("kotlin/Int; @Ann() kotlin/String")!>@Ann String<!>) {}
set(s: <!WRONG_SETTER_PARAMETER_TYPE("kotlin.Int; @Ann() kotlin.String")!>@Ann String<!>) {}
fun f4(fn: (@Ann Int, @Ann Int) -> Unit) {}
val test4 = f4 <!ARGUMENT_TYPE_MISMATCH("kotlin/Function2<@Ann() kotlin/Int, @Ann() kotlin/Int, kotlin/Unit>; kotlin/Function1<@Ann() kotlin/Int, kotlin/Unit>")!>{ single -> }<!>
val test4 = f4 <!ARGUMENT_TYPE_MISMATCH("kotlin.Function2<@Ann() kotlin.Int, @Ann() kotlin.Int, kotlin.Unit>; kotlin.Function1<@Ann() kotlin.Int, kotlin.Unit>")!>{ single -> }<!>
@@ -11,5 +11,5 @@ class C<T> {
}
fun test(a: C<out CharSequence>) {
a[1] = <!ARGUMENT_TYPE_MISMATCH("@A() CapturedType(out kotlin/CharSequence); kotlin/Int")!>25<!>
a[1] = <!ARGUMENT_TYPE_MISMATCH("@A() CapturedType(out kotlin.CharSequence); kotlin.Int")!>25<!>
}
@@ -13,5 +13,5 @@ class C<T> {
class Out<out F>
fun test(a: C<out CharSequence>, y: Out<CharSequence>) {
a + <!ARGUMENT_TYPE_MISMATCH("Out<@A() CapturedType(out kotlin/CharSequence)>; Out<kotlin/CharSequence>")!>y<!>
a + <!ARGUMENT_TYPE_MISMATCH("Out<@A() CapturedType(out kotlin.CharSequence)>; Out<kotlin.CharSequence>")!>y<!>
}
@@ -30,7 +30,7 @@ fun testYield() {
val buildee = build {
yield { val x: UserKlass = <!UNRESOLVED_REFERENCE!>it<!> }
}
checkExactType<Buildee<(UserKlass) -> Unit>>(<!ARGUMENT_TYPE_MISMATCH("Buildee<kotlin/Function1<UserKlass, kotlin/Unit>>; Buildee<kotlin/Function0<kotlin/Unit>>")!>buildee<!>)
checkExactType<Buildee<(UserKlass) -> Unit>>(<!ARGUMENT_TYPE_MISMATCH("Buildee<kotlin.Function1<UserKlass, kotlin.Unit>>; Buildee<kotlin.Function0<kotlin.Unit>>")!>buildee<!>)
}
// test 2: PTV is in producing position (materialize-case)
@@ -42,5 +42,5 @@ fun testMaterialize() {
materialize()
)
}
checkExactType<Buildee<(UserKlass) -> Unit>>(<!ARGUMENT_TYPE_MISMATCH("Buildee<kotlin/Function1<UserKlass, kotlin/Unit>>; Buildee<kotlin/Function0<kotlin/Unit>>")!>buildee<!>)
checkExactType<Buildee<(UserKlass) -> Unit>>(<!ARGUMENT_TYPE_MISMATCH("Buildee<kotlin.Function1<UserKlass, kotlin.Unit>>; Buildee<kotlin.Function0<kotlin.Unit>>")!>buildee<!>)
}
@@ -30,7 +30,7 @@ fun testYield() {
val buildee = build {
yield { val x: UserKlass = this<!UNRESOLVED_LABEL!>@yield<!> }
}
checkExactType<Buildee<UserKlass.() -> Unit>>(<!ARGUMENT_TYPE_MISMATCH("Buildee<kotlin/Function1<UserKlass, kotlin/Unit>>; Buildee<kotlin/Function0<kotlin/Unit>>")!>buildee<!>)
checkExactType<Buildee<UserKlass.() -> Unit>>(<!ARGUMENT_TYPE_MISMATCH("Buildee<kotlin.Function1<UserKlass, kotlin.Unit>>; Buildee<kotlin.Function0<kotlin.Unit>>")!>buildee<!>)
}
// test 2: PTV is in producing position (materialize-case)
@@ -42,5 +42,5 @@ fun testMaterialize() {
materialize()
)
}
checkExactType<Buildee<UserKlass.() -> Unit>>(<!ARGUMENT_TYPE_MISMATCH("Buildee<kotlin/Function1<UserKlass, kotlin/Unit>>; Buildee<kotlin/Function0<kotlin/Unit>>")!>buildee<!>)
checkExactType<Buildee<UserKlass.() -> Unit>>(<!ARGUMENT_TYPE_MISMATCH("Buildee<kotlin.Function1<UserKlass, kotlin.Unit>>; Buildee<kotlin.Function0<kotlin.Unit>>")!>buildee<!>)
}
@@ -27,5 +27,5 @@ fun testMaterialize() {
val buildee = build {
shareTypeInfo(null, materialize())
}
checkExactType<Buildee<Nothing?>>(<!ARGUMENT_TYPE_MISMATCH("Buildee<kotlin/Nothing?>; Buildee<kotlin/Nothing>")!>buildee<!>)
checkExactType<Buildee<Nothing?>>(<!ARGUMENT_TYPE_MISMATCH("Buildee<kotlin.Nothing?>; Buildee<kotlin.Nothing>")!>buildee<!>)
}
@@ -1 +1 @@
/kt45461.kt:(245,252): warning: Type argument for type parameter 'S' cannot be inferred because it has incompatible upper bounds: kotlin/String, kotlin/Int (multiple incompatible classes). This will become an error in Kotlin 2.0.
/kt45461.kt:(245,252): warning: Type argument for type parameter 'S' cannot be inferred because it has incompatible upper bounds: kotlin.String, kotlin.Int (multiple incompatible classes). This will become an error in Kotlin 2.0.
@@ -1 +1 @@
/kt45461_12.kt:(296,303): warning: Type argument for type parameter 'S' cannot be inferred because it has incompatible upper bounds: kotlin/String, K (multiple incompatible classes: kotlin/String, kotlin/Number). This will become an error in Kotlin 2.0.
/kt45461_12.kt:(296,303): warning: Type argument for type parameter 'S' cannot be inferred because it has incompatible upper bounds: kotlin.String, K (multiple incompatible classes: kotlin/String, kotlin/Number). This will become an error in Kotlin 2.0.
@@ -1,3 +1,3 @@
/kt45461_2.kt:(198,201): warning: Type 'kotlin/Int' is final, so the value of the type parameter is predetermined.
/kt45461_2.kt:(198,201): warning: Type 'kotlin.Int' is final, so the value of the type parameter is predetermined.
/kt45461_2.kt:(253,260): warning: Type argument for type parameter 'S' cannot be inferred because it has incompatible upper bounds: kotlin/String, K (multiple incompatible classes: kotlin/String, kotlin/Int). This will become an error in Kotlin 2.0.
/kt45461_2.kt:(253,260): warning: Type argument for type parameter 'S' cannot be inferred because it has incompatible upper bounds: kotlin.String, K (multiple incompatible classes: kotlin/String, kotlin/Int). This will become an error in Kotlin 2.0.
@@ -1,5 +1,5 @@
/kt45461_25.fir.kt:(176,180): warning: Unchecked cast of 'kotlin/Nothing?' to 'S'.
/kt45461_25.fir.kt:(176,180): warning: Unchecked cast of 'kotlin.Nothing?' to 'S'.
/kt45461_25.fir.kt:(206,209): warning: Type 'kotlin/Int' is final, so the value of the type parameter is predetermined.
/kt45461_25.fir.kt:(206,209): warning: Type 'kotlin.Int' is final, so the value of the type parameter is predetermined.
/kt45461_25.fir.kt:(276,283): error: Type argument for type parameter 'S' cannot be inferred because it has incompatible upper bounds: kotlin/String, K (multiple incompatible classes: kotlin/String, kotlin/Int).
/kt45461_25.fir.kt:(276,283): error: Type argument for type parameter 'S' cannot be inferred because it has incompatible upper bounds: kotlin.String, K (multiple incompatible classes: kotlin/String, kotlin/Int).
@@ -8,5 +8,5 @@ class Bar<T> {
fun <K : L, L : N, N: <!FINAL_UPPER_BOUND!>Int<!>> main() {
val foo = Foo<K>()
val x: Float = Bar<String>().<!INFERRED_TYPE_VARIABLE_INTO_EMPTY_INTERSECTION_ERROR("S; kotlin/String, K; multiple incompatible classes; : kotlin/String, kotlin/Int")!>takeFoo<!>(foo) // error in 1.3.72, no error in 1.4.31
val x: Float = Bar<String>().<!INFERRED_TYPE_VARIABLE_INTO_EMPTY_INTERSECTION_ERROR("S; kotlin.String, K; multiple incompatible classes; : kotlin/String, kotlin/Int")!>takeFoo<!>(foo) // error in 1.3.72, no error in 1.4.31
}
@@ -1,3 +1,3 @@
/kt45461_26.fir.kt:(176,180): warning: Unchecked cast of 'kotlin/Nothing?' to 'S'.
/kt45461_26.fir.kt:(176,180): warning: Unchecked cast of 'kotlin.Nothing?' to 'S'.
/kt45461_26.fir.kt:(224,232): warning: Type 'Out<kotlin/Int>' is final, so the value of the type parameter is predetermined.
/kt45461_26.fir.kt:(224,232): warning: Type 'Out<kotlin.Int>' is final, so the value of the type parameter is predetermined.
@@ -1 +1 @@
/kt45461_5.kt:(269,276): warning: Type argument for type parameter 'S' cannot be inferred because it has incompatible upper bounds: kotlin/String, K (multiple incompatible classes: kotlin/String, kotlin/Number). This will become an error in Kotlin 2.0.
/kt45461_5.kt:(269,276): warning: Type argument for type parameter 'S' cannot be inferred because it has incompatible upper bounds: kotlin.String, K (multiple incompatible classes: kotlin/String, kotlin/Number). This will become an error in Kotlin 2.0.
@@ -1,5 +1,5 @@
/kt48765.kt:(282,285): warning: Type argument for type parameter 'T' cannot be inferred because it has incompatible upper bounds: kotlin/String, kotlin/Number (multiple incompatible classes). This will become an error in Kotlin 2.0.
/kt48765.kt:(282,285): warning: Type argument for type parameter 'T' cannot be inferred because it has incompatible upper bounds: kotlin.String, kotlin.Number (multiple incompatible classes). This will become an error in Kotlin 2.0.
/kt48765.kt:(345,351): warning: Type 'kotlin/String' is final, so the value of the type parameter is predetermined.
/kt48765.kt:(345,351): warning: Type 'kotlin.String' is final, so the value of the type parameter is predetermined.
/kt48765.kt:(379,383): warning: Unchecked cast of 'kotlin/String' to 'T'.
/kt48765.kt:(379,383): warning: Unchecked cast of 'kotlin.String' to 'T'.
@@ -1 +1 @@
/kt49661.fir.kt:(243,244): warning: Type argument for type parameter 'T' cannot be inferred because it has incompatible upper bounds: Foo, kotlin/Int (multiple incompatible classes). This will become an error in Kotlin 2.0.
/kt49661.fir.kt:(243,244): warning: Type argument for type parameter 'T' cannot be inferred because it has incompatible upper bounds: Foo, kotlin.Int (multiple incompatible classes). This will become an error in Kotlin 2.0.
@@ -1,7 +1,7 @@
/main.kt:(98,103): error: Argument type mismatch: actual type is 'V', but 'V & Any' was expected.
/main.kt:(119,120): error: Argument type mismatch: actual type is 'kotlin/collections/List<V>', but 'kotlin/collections/(Mutable)List<@NotNull() V & Any>' was expected.
/main.kt:(119,120): error: Argument type mismatch: actual type is 'kotlin.collections.List<V>', but 'kotlin.collections.(Mutable)List<@NotNull() V & Any>' was expected.
/main.kt:(133,138): error: Argument type mismatch: actual type is 'V', but 'E & Any' was expected.
/main.kt:(154,155): error: Argument type mismatch: actual type is 'kotlin/collections/List<V>', but 'kotlin/collections/(Mutable)List<@NotNull() E & Any>' was expected.
/main.kt:(154,155): error: Argument type mismatch: actual type is 'kotlin.collections.List<V>', but 'kotlin.collections.(Mutable)List<@NotNull() E & Any>' was expected.
@@ -7,6 +7,6 @@ fun main(args: Array<String>) {
var intVar: Int? = 1
var byteVar: Byte? = 1
intFun(<!ARGUMENT_TYPE_MISMATCH("kotlin/Int; kotlin/Int?")!>intVar?.toInt()<!>)
byteFun(<!ARGUMENT_TYPE_MISMATCH("kotlin/Byte; kotlin/Byte?")!>byteVar?.toByte()<!>)
intFun(<!ARGUMENT_TYPE_MISMATCH("kotlin.Int; kotlin.Int?")!>intVar?.toInt()<!>)
byteFun(<!ARGUMENT_TYPE_MISMATCH("kotlin.Byte; kotlin.Byte?")!>byteVar?.toByte()<!>)
}
@@ -5,7 +5,7 @@ class A() {
field = <!ASSIGNMENT_TYPE_MISMATCH!>value<!>
}
val y: Int
get(): <!WRONG_GETTER_RETURN_TYPE("kotlin/Int; kotlin/String")!>String<!> = "s"
get(): <!WRONG_GETTER_RETURN_TYPE("kotlin.Int; kotlin.String")!>String<!> = "s"
val z: Int
get() {
return <!RETURN_TYPE_MISMATCH!>"s"<!>
@@ -13,7 +13,7 @@ fun testElvis(a: Int?, b: Int?) {
if (a != null) {
doInt(b ?: a)
}
<!INFERRED_TYPE_VARIABLE_INTO_POSSIBLE_EMPTY_INTERSECTION("T; a/A, kotlin/Int; final class and interface")!>doList<!>(getList() ?: emptyListOfA()) //should be an error
<!INFERRED_TYPE_VARIABLE_INTO_POSSIBLE_EMPTY_INTERSECTION("T; a.A, kotlin.Int; final class and interface")!>doList<!>(getList() ?: emptyListOfA()) //should be an error
doList(getList() ?: strangeList { doInt(it) }) //lambda was not analyzed
}
@@ -12,7 +12,7 @@ fun <T: A> emptyNullableListOfA(): List<T>? = null
//-------------------------------
fun testExclExcl() {
<!INFERRED_TYPE_VARIABLE_INTO_POSSIBLE_EMPTY_INTERSECTION("T; a/A, kotlin/Int; final class and interface")!>doList<!>(emptyNullableListOfA()!!) //should be an error here
<!INFERRED_TYPE_VARIABLE_INTO_POSSIBLE_EMPTY_INTERSECTION("T; a.A, kotlin.Int; final class and interface")!>doList<!>(emptyNullableListOfA()!!) //should be an error here
val l: List<Int> = <!DEBUG_INFO_EXPRESSION_TYPE("kotlin.collections.List<a.A & kotlin.Int>")!>id(<!INFERRED_TYPE_VARIABLE_INTO_POSSIBLE_EMPTY_INTERSECTION!>emptyNullableListOfA<!>()!!)<!>
doList(strangeNullableList { doInt(it) }!!) //lambda should be analyzed (at completion phase)
@@ -1,3 +1,3 @@
/B.kt:(133,134): error: Smart cast to 'kotlin/String' is impossible, because 'x' is a public API property declared in different module.
/B.kt:(133,134): error: Smart cast to 'kotlin.String' is impossible, because 'x' is a public API property declared in different module.
/B.kt:(265,268): error: Smart cast to 'kotlin/String' is impossible, because 'x' is a public API property declared in different module.
/B.kt:(265,268): error: Smart cast to 'kotlin.String' is impossible, because 'x' is a public API property declared in different module.
@@ -5,7 +5,7 @@
fun <T> foo(it: @kotlin.internal.Exact T) {}
fun main() {
foo<Any>(<!ARGUMENT_TYPE_MISMATCH("kotlin/Any; kotlin/String")!>""<!>)
foo<Any>(<!ARGUMENT_TYPE_MISMATCH("kotlin.Any; kotlin.String")!>""<!>)
}
interface I
@@ -1 +1 @@
/upperBoundViolated2.fir.kt:(111,123): error: Type argument is not within its bounds: should be subtype of 'kotlin/collections/List<kotlin/CharSequence>'.
/upperBoundViolated2.fir.kt:(111,123): error: Type argument is not within its bounds: should be subtype of 'kotlin.collections.List<kotlin.CharSequence>'.
@@ -5,10 +5,10 @@ build:
[mkdir] Created dir: [Temp]/classes
[javac] Compiling 2 source files to [Temp]/classes
[javac] Compiling [[TestData]] => [[Temp]/classes]
[javac] [TestData]/literals.kt:6:9: error: argument type mismatch: actual type is 'kotlin/FloatArray', but 'kotlin/IntArray' was expected.
[javac] [TestData]/literals.kt:6:9: error: argument type mismatch: actual type is 'kotlin.FloatArray', but 'kotlin.IntArray' was expected.
[javac] @AnnInt([1, 2])
[javac] ^
[javac] [TestData]/literals.kt:9:9: error: argument type mismatch: actual type is 'kotlin/FloatArray', but 'kotlin/IntArray' was expected.
[javac] [TestData]/literals.kt:9:9: error: argument type mismatch: actual type is 'kotlin.FloatArray', but 'kotlin.IntArray' was expected.
[javac] @AnnInt(intArrayOf(1, 2))
[javac] ^
@@ -1,13 +1,13 @@
/localVariables.fir.kt:(401,409): error: 'val' cannot be reassigned.
/localVariables.fir.kt:(412,418): error: Assignment type mismatch: actual type is 'kotlin/String', but 'StringProperty' was expected.
/localVariables.fir.kt:(412,418): error: Assignment type mismatch: actual type is 'kotlin.String', but 'StringProperty' was expected.
/localVariables.fir.kt:(521,529): error: 'val' cannot be reassigned.
/localVariables.fir.kt:(673,679): error: Assignment type mismatch: actual type is 'kotlin/String', but 'StringProperty' was expected.
/localVariables.fir.kt:(673,679): error: Assignment type mismatch: actual type is 'kotlin.String', but 'StringProperty' was expected.
/localVariables.fir.kt:(917,925): error: 'val' cannot be reassigned.
/localVariables.fir.kt:(928,934): error: Assignment type mismatch: actual type is 'kotlin/String', but 'StringProperty' was expected.
/localVariables.fir.kt:(928,934): error: Assignment type mismatch: actual type is 'kotlin.String', but 'StringProperty' was expected.
/localVariables.fir.kt:(995,1003): error: 'val' cannot be reassigned.
@@ -10,4 +10,4 @@
/methodDeclaration.fir.kt:(870,875): error: 'val' cannot be reassigned.
/methodDeclaration.fir.kt:(878,880): error: Assignment type mismatch: actual type is 'kotlin/Int', but '<local>/IntProperty' was expected.
/methodDeclaration.fir.kt:(878,880): error: Assignment type mismatch: actual type is 'kotlin.Int', but '<local>.IntProperty' was expected.
@@ -1,19 +1,19 @@
/noAnnotation.fir.kt:(424,429): error: 'val' cannot be reassigned.
/noAnnotation.fir.kt:(432,436): error: Assignment type mismatch: actual type is 'kotlin/String', but 'StringProperty' was expected.
/noAnnotation.fir.kt:(432,436): error: Assignment type mismatch: actual type is 'kotlin.String', but 'StringProperty' was expected.
/noAnnotation.fir.kt:(446,451): error: 'val' cannot be reassigned.
/noAnnotation.fir.kt:(500,505): error: 'val' cannot be reassigned.
/noAnnotation.fir.kt:(508,512): error: Assignment type mismatch: actual type is 'kotlin/String', but 'StringProperty' was expected.
/noAnnotation.fir.kt:(508,512): error: Assignment type mismatch: actual type is 'kotlin.String', but 'StringProperty' was expected.
/noAnnotation.fir.kt:(544,549): error: 'val' cannot be reassigned.
/noAnnotation.fir.kt:(588,593): error: 'val' cannot be reassigned.
/noAnnotation.fir.kt:(596,598): error: Assignment type mismatch: actual type is 'kotlin/Int', but 'StringProperty' was expected.
/noAnnotation.fir.kt:(596,598): error: Assignment type mismatch: actual type is 'kotlin.Int', but 'StringProperty' was expected.
/noAnnotation.fir.kt:(624,629): error: 'val' cannot be reassigned.
/noAnnotation.fir.kt:(632,634): error: Assignment type mismatch: actual type is 'kotlin/Int', but 'StringProperty' was expected.
/noAnnotation.fir.kt:(632,634): error: Assignment type mismatch: actual type is 'kotlin.Int', but 'StringProperty' was expected.