Skip to content

macro trailing body allows default arguments but cannot use them #2148

Closed
@Book-reader

Description

@Book-reader
fn int main()
{
  @foo(;int x = 2)
  {

  };
}

macro @foo(; @body(int x = 1))
{

}

this is allowed, but neither of these default values can ever be used because you cannot omit parameters when calling @body() in the macro.

Metadata

Metadata

Assignees

Labels

BugSomething isn't workingFixed needs testingNeeds verification / testing that it now works

Type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions