fun test(x: T?, y: S, z: T) { x is T x is T? y is T y is S y is T? y is S? z is T z is T? null as T null as T? null as S } inline fun test(x: T?) { x is T null as T null as T? } fun foo(x: List, y: List?) { x is List y is List }