class A {} fun foo(t: T) {} fun emptyList(): List = throw Exception() fun bar() { foo(emptyList()) }