Add FIR_IDENTICAL to some tests
This commit is contained in:
committed by
TeamCityServer
parent
c6298398ef
commit
a26a195c35
Vendored
-18
@@ -1,18 +0,0 @@
|
||||
// !LANGUAGE: +MultiPlatformProjects
|
||||
// SKIP_TXT
|
||||
// MODULE: m1-common
|
||||
// FILE: common.kt
|
||||
|
||||
package kotlin.jvm
|
||||
|
||||
annotation class JvmInline
|
||||
|
||||
expect value class VC(val a: Any)
|
||||
|
||||
// MODULE: m2-jvm(m1-common)
|
||||
// FILE: jvm.kt
|
||||
|
||||
package kotlin.jvm
|
||||
|
||||
@JvmInline
|
||||
actual value class VC(val a: Any)
|
||||
Vendored
+1
@@ -1,3 +1,4 @@
|
||||
// FIR_IDENTICAL
|
||||
// !LANGUAGE: +MultiPlatformProjects
|
||||
// SKIP_TXT
|
||||
// MODULE: m1-common
|
||||
|
||||
Vendored
-7
@@ -1,7 +0,0 @@
|
||||
// !LANGUAGE: -AllowNullOperatorsForResult
|
||||
// !DIAGNOSTICS: -UNUSED_EXPRESSION
|
||||
|
||||
fun test(r: Result<Int>?) {
|
||||
r ?: 0
|
||||
r?.isFailure
|
||||
}
|
||||
Vendored
+1
@@ -1,3 +1,4 @@
|
||||
// FIR_IDENTICAL
|
||||
// !LANGUAGE: -AllowNullOperatorsForResult
|
||||
// !DIAGNOSTICS: -UNUSED_EXPRESSION
|
||||
|
||||
|
||||
Vendored
-4
@@ -1,4 +0,0 @@
|
||||
// !LANGUAGE: +InlineClasses -AllowResultInReturnType
|
||||
|
||||
fun result(): Result<Int> = TODO()
|
||||
val resultP: Result<Int> = result()
|
||||
+1
@@ -1,3 +1,4 @@
|
||||
// FIR_IDENTICAL
|
||||
// !LANGUAGE: +InlineClasses -AllowResultInReturnType
|
||||
|
||||
fun result(): Result<Int> = TODO()
|
||||
|
||||
-40
@@ -1,40 +0,0 @@
|
||||
// !DIAGNOSTICS: -UNUSED_EXPRESSION
|
||||
// !LANGUAGE: -AllowNullOperatorsForResult -AllowResultInReturnType
|
||||
|
||||
fun <T> id(x: T): T = x
|
||||
|
||||
private val asFun: () -> Result<Int>? = TODO()
|
||||
private val Int.intResult: Result<Int>?
|
||||
get() = null
|
||||
|
||||
fun returnInt(): Int? = 0
|
||||
|
||||
|
||||
fun nullableOperators(r1: Result<Int>?, b: Boolean) {
|
||||
if (b) {
|
||||
r1!!
|
||||
asFun()!!
|
||||
returnInt()?.intResult!!.toString()
|
||||
}
|
||||
|
||||
if (b) {
|
||||
id(r1)!!
|
||||
}
|
||||
|
||||
if (b) {
|
||||
r1?.toString()
|
||||
r1?.let { }
|
||||
returnInt()?.intResult?.toString()
|
||||
asFun()?.toString()
|
||||
id(r1)?.toString()
|
||||
}
|
||||
|
||||
if (b) {
|
||||
r1 ?: 0
|
||||
r1 ?: r1
|
||||
asFun() ?: r1 ?: 0
|
||||
id(asFun()) ?: 0
|
||||
|
||||
returnInt() ?: returnInt() ?: asFun() ?: 0
|
||||
}
|
||||
}
|
||||
Vendored
+1
@@ -1,3 +1,4 @@
|
||||
// FIR_IDENTICAL
|
||||
// !DIAGNOSTICS: -UNUSED_EXPRESSION
|
||||
// !LANGUAGE: -AllowNullOperatorsForResult -AllowResultInReturnType
|
||||
|
||||
|
||||
Reference in New Issue
Block a user