Skip to content

Named/positional arguments #358

Description

@mpierson531

Something like this does not appear to work:

public static Rectangle Rectangle(Vec2f position, Vec2f size, Color color = default) 
{
      return  new Rectangle(position, size, color);
}

Rectangle rect = Rectangle(Vec2f.Zero, Vec2f.Zero, color: Color.Red);

When calling the function it says "color" is an unknown identifier.

It wasn't explicitly listed in the limitations, so I wasn't sure if it's a bug or just not possible.

Metadata

Metadata

Assignees

No one assigned

    Fields

    No fields configured for Feature.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions