package bar // should be thrown away fun List.a() {} fun test1(i: Int?) { 1.a() i.a() } fun test2(c: Collection) { c.a() } fun Int.foo() {} fun test3(s: String?) { "".foo() s.foo() "".foo(1) s.foo("a") } interface A fun T.c() {} fun test4() { 1.c() } // should be an error on receiver, shouldn't be thrown away fun test5() { 1.(fun String.()=1)() } fun R?.sure() : R = this!! fun test6(l: List?) { l.sure<T>() } fun List.b() {} fun test7(l: List) { l.b() } fun test8(l: List?) { l.b() }