fun test(i: Int) { var fn: () -> String fn = if (i == 1) { { "foo" } } else if (i == 2) { { "bar" } } else { { "baz" } } }