Skip to content

Lambda as UDA clashes with Shortened Function Definition #21007

@zero-vector

Description

@zero-vector
struct UDA {}

int foo() @UDA => 123;

void main()
{
    assert(foo() == 123);
    // error: undefined reference to '_D9onlineapp3fooFZi'
}

The issue was originally reported as spec issue dlang/dlang.org#4137
But I think it belongs here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions