Closed
Description
Title: Function expression can't be the left argument to is
/as
.
Minimal reproducer (https://cpp2.godbolt.org/z/K53erj1fh):
main: () = {
:() = 0; is int;
}
Commands:
cppfront -clean-cpp1 main.cpp2
Expected result:
Same as (https://cpp2.godbolt.org/z/8nszP1Wo4):
main: () = {
cp := :(x) -> _ = x;
cp(:() = 0) is int;
}
Actual result and error:
main.cpp2(1,12): error: ill-formed initializer (at '{')
main.cpp2(1,1): error: unexpected text at end of Cpp2 code section (at 'main')
main.cpp2(1,0): error: parse failed for section starting here