class A(val n: Int) { fun getFoo(): Boolean { return n > 1 } } fun test() { val t = A(1).getFoo() }