[FIR-TEST] Add new testdata generated after changes in previous commit

This commit is contained in:
Dmitriy Novozhilov
2019-12-11 16:16:22 +03:00
parent e9c02a1cca
commit 2536fa0cd5
4578 changed files with 104067 additions and 1 deletions
@@ -0,0 +1,30 @@
// !WITH_NEW_INFERENCE
// NI_EXPECTED_FILE
// See KT-10244: no intersection types in signatures
open class B
interface A
interface C
// Error!
fun foo(b: B) = if (b is A && b is C) b else null
// Ok: given explicitly
fun gav(b: B): A? = if (b is A && b is C) b else null
class My(b: B) {
// Error!
val x = if (b is A && b is C) b else null
// Ok: given explicitly
val y: C? = if (b is A && b is C) b else null
// Error!
fun foo(b: B) = if (b is A && b is C) b else null
}
fun bar(b: B): String {
// Ok: local variable
val tmp = if (b is A && b is C) b else null
// Error: local function
fun foo(b: B) = if (b is A && b is C) b else null
return tmp.toString()
}