cppfront
cppfront copied to clipboard
[BUG] Moved statement parameter parsed as parameter list when accessed
trafficstars
Title: Moved statement parameter parsed as parameter list when accessed.
Minimal reproducer (https://cpp2.godbolt.org/z/6Y7f7eYG1):
main: (args) = {
(copy x: args) {
(move x).clear();
}
}
Commands: `cppfront main.cpp2`
Expected result: Same as ((move x).clear());.
Actual result and error: error: (temporary alpha limitation) parameters scoped to a block/statement must be 'in' (the default), 'copy', or 'inout'.
I think the issue might be that the context of the () isn't special,
like in function parameter lists, initializer lists, or return statements.