hsutter / cppfront

A personal experimental C++ Syntax 2 -> Syntax 1 compiler

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[BUG] trailing comma is not allowed on assert statements

DyXel opened this issue · comments

Describe the bug
Title. An assert should behave just like a function call.

main: () = {
    foo(a, b,); // works
    assert(true, "some_potentially_long_string",); // doesn't work
}

Output:

test.cpp2...
test.cpp2(3,48): error: expected ')' at the end of the contract (at ',')

Thanks! Fixed by #1121.