Remove OI/NI attributes from test data
This commit is contained in:
committed by
teamcityserver
parent
2ecba6ac39
commit
ddbdfafa79
@@ -6,24 +6,24 @@ interface A
|
||||
interface C
|
||||
|
||||
// Error!
|
||||
fun <!IMPLICIT_INTERSECTION_TYPE{OI}!>foo<!>(b: B) = if (b is A && b is C) b else null
|
||||
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) <!DEBUG_INFO_SMARTCAST!>b<!> else null
|
||||
|
||||
class My(b: B) {
|
||||
// Error!
|
||||
val <!IMPLICIT_INTERSECTION_TYPE{OI}!>x<!> = if (b is A && b is C) b else null
|
||||
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) <!DEBUG_INFO_SMARTCAST!>b<!> else null
|
||||
// Error!
|
||||
fun <!IMPLICIT_INTERSECTION_TYPE{OI}!>foo<!>(b: B) = if (b is A && b is C) b else null
|
||||
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 <!IMPLICIT_INTERSECTION_TYPE{OI}!>foo<!>(b: B) = if (b is A && b is C) b else null
|
||||
fun foo(b: B) = if (b is A && b is C) b else null
|
||||
return tmp.toString()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user