Closed
Description
It works with an extra ;
, if the expression function has a compound-statement, or with a statement in-between.
Minimal reproducer (https://godbolt.org/z/TfajzxMT1):
main: () = {
:() = 1;
[[assert: 1]]
}
Commands:
cppfront x.cpp2
Expected result: The same as any of the first two workarounds above.
Actual result and error:
main.cpp2(3,4): error: subscript expression [ ] must not be empty (if you were trying to name a C-style array type, use 'std::array' instead) (at '[')