Implicit nothing / intersection types are now checked also for member functions #KT-11666 Fixed
This commit is contained in:
committed by
Mikhail Glukhikh
parent
0ea3b4ade4
commit
4c03aaabd4
@@ -14,6 +14,8 @@ class My(b: B) {
|
||||
val <!IMPLICIT_INTERSECTION_TYPE!>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!>foo<!>(b: B) = if (b is A && b is C) b else null
|
||||
}
|
||||
|
||||
fun bar(b: B): String {
|
||||
|
||||
Reference in New Issue
Block a user