blob: 19f03dc88835d481349c8689367be024437af1f8 [file] [log] [blame]
//KT-1290 Method property in constructor causes NPE
class Foo<T>(val filter: (T) -> Boolean) {
public fun bar(tee: T) : Boolean {
return filter(tee);
}
}
fun foo() = Foo({ i: Int -> i < 5 }).bar(2)
fun box() : String {
if (!foo()) return "fail"
return "OK"
}