// FILE: 1.kt package test class A class B inline fun Any?.foo() = this is T? // FILE: 2.kt import test.* fun box(): String { if (null.foo() != true) return "fail 1" if (null.foo() != true) return "fail 2" if (null.foo() != true) return "fail 3" if (null.foo() != true) return "fail 4" val a = A() if (a.foo() != true) return "fail 5" if (a.foo() != true) return "fail 6" if (a.foo() != true) return "fail 7" if (a.foo() != true) return "fail 8" val b = B() if (b.foo() != false) return "fail 9" if (b.foo() != false) return "fail 10" return "OK" }