diff --git a/compiler/testData/diagnostics/nativeTests/forwardDeclarations.fir.kt b/compiler/testData/diagnostics/nativeTests/forwardDeclarations.fir.kt index c5eed710676..66bb3275ea0 100644 --- a/compiler/testData/diagnostics/nativeTests/forwardDeclarations.fir.kt +++ b/compiler/testData/diagnostics/nativeTests/forwardDeclarations.fir.kt @@ -48,7 +48,7 @@ interface FwdProtocol // FILE: main.kt // this inspections differs in K1/K2, but unrelated to what is tested in this test -@file:Suppress("CAST_NEVER_SUCCEEDS", "UNUSED_PARAMETER", "UNUSED_EXPRESSION", "UNUSED_VARIABLE", "INCOMPATIBLE_TYPES") +@file:Suppress("UNUSED_PARAMETER", "UNUSED_EXPRESSION", "UNUSED_VARIABLE", "INCOMPATIBLE_TYPES") fun testUnckeckedAsFromAny(x: Any) { x as? cnames.structs.FwdStruct @@ -95,6 +95,9 @@ fun testInline4() { fun testCheckedAs1(x : lib.FwdStruct) = x as cnames.structs.FwdStruct fun testCheckedAs2(x : lib.FwdObjcClass) = x as objcnames.classes.FwdObjcClass fun testCheckedAs3(x : lib.FwdProtocol) = x as objcnames.protocols.FwdProtocol +fun testCheckedSafeAs4(x : lib.FwdStruct) = x as? cnames.structs.FwdStruct +fun testCheckedSafeAs5(x : lib.FwdObjcClass) = x as? objcnames.classes.FwdObjcClass +fun testCheckedSafeAs6(x : lib.FwdProtocol) = x as? objcnames.protocols.FwdProtocol fun testUnCheckedAs1(x : lib2.FwdStruct) = x as cnames.structs.FwdStruct fun testUnCheckedAs2(x : lib2.FwdObjcClass) = x as objcnames.classes.FwdObjcClass diff --git a/compiler/testData/diagnostics/nativeTests/forwardDeclarations.kt b/compiler/testData/diagnostics/nativeTests/forwardDeclarations.kt index e73dd2c79be..8af4d3ab03f 100644 --- a/compiler/testData/diagnostics/nativeTests/forwardDeclarations.kt +++ b/compiler/testData/diagnostics/nativeTests/forwardDeclarations.kt @@ -48,7 +48,7 @@ interface FwdProtocol // FILE: main.kt // this inspections differs in K1/K2, but unrelated to what is tested in this test -@file:Suppress("CAST_NEVER_SUCCEEDS", "UNUSED_PARAMETER", "UNUSED_EXPRESSION", "UNUSED_VARIABLE", "INCOMPATIBLE_TYPES") +@file:Suppress("UNUSED_PARAMETER", "UNUSED_EXPRESSION", "UNUSED_VARIABLE", "INCOMPATIBLE_TYPES") fun testUnckeckedAsFromAny(x: Any) { x as? cnames.structs.FwdStruct @@ -92,12 +92,15 @@ fun testInline4() { val c : (objcnames.protocols.FwdProtocol) -> Unit = ::inlineF } -fun testCheckedAs1(x : lib.FwdStruct) = x as cnames.structs.FwdStruct -fun testCheckedAs2(x : lib.FwdObjcClass) = x as objcnames.classes.FwdObjcClass +fun testCheckedAs1(x : lib.FwdStruct) = x as cnames.structs.FwdStruct +fun testCheckedAs2(x : lib.FwdObjcClass) = x as objcnames.classes.FwdObjcClass fun testCheckedAs3(x : lib.FwdProtocol) = x as objcnames.protocols.FwdProtocol +fun testCheckedSafeAs4(x : lib.FwdStruct) = x as? cnames.structs.FwdStruct +fun testCheckedSafeAs5(x : lib.FwdObjcClass) = x as? objcnames.classes.FwdObjcClass +fun testCheckedSafeAs6(x : lib.FwdProtocol) = x as? objcnames.protocols.FwdProtocol -fun testUnCheckedAs1(x : lib2.FwdStruct) = x as cnames.structs.FwdStruct -fun testUnCheckedAs2(x : lib2.FwdObjcClass) = x as objcnames.classes.FwdObjcClass +fun testUnCheckedAs1(x : lib2.FwdStruct) = x as cnames.structs.FwdStruct +fun testUnCheckedAs2(x : lib2.FwdObjcClass) = x as objcnames.classes.FwdObjcClass fun testUnCheckedAs3(x : lib2.FwdProtocol) = x as objcnames.protocols.FwdProtocol -fun testUnCheckedAs4(x : lib.FwdStruct) = x as objcnames.classes.FwdObjcClass +fun testUnCheckedAs4(x : lib.FwdStruct) = x as objcnames.classes.FwdObjcClass