hsutter / cppfront

A personal experimental C++ Syntax 2 -> Syntax 1 compiler
Other
5.23k stars 224 forks source link

Default initialize function argument, closes #1090 #1092

Closed sookach closed 2 weeks ago

sookach commented 1 month ago

@hsutter @bluetarpmedia This patches #1090 by allowing defaulting of arguments in a function call by use of '()' (akin to '{}' in C++).

MaxSagebaum commented 1 month ago

Looks good, a regression test would be nice.

sookach commented 1 month ago

Looks good, a regression test would be nice.

Yeah, it passed on my fork https://github.com/sookach/cppfront/tree/pr/default_arg

but it looks like the tests don't run on their own in this repo?

gregmarr commented 1 month ago

but it looks like the tests don't run on their own in this repo?

https://docs.github.com/en/actions/managing-workflow-runs/approving-workflow-runs-from-public-forks

By default, all first-time contributors require approval to run workflows.

MaxSagebaum commented 1 month ago

Looks good, a regression test would be nice.

Yeah, it passed on my fork https://github.com/sookach/cppfront/tree/pr/default_arg

but it looks like the tests don't run on their own in this repo?

Ah, what I meant, is that it would be nice if you add a regression test for the new feature. Sorry for the misunderstanding.

sookach commented 1 month ago

Cool, added a regression test. Let me know what you think.

hsutter commented 2 weeks ago

Thanks!