Skip to content

Lambda function missing parens in generated D import file #23326

Description

@tim-dlang
enum i = (x => x * 2)(3);

Converting the above file to a D import file with dmd -H -c test.d results in file test.di:

// D import file generated from 'test.d'
enum i = (x) => x * 2(3);

The result is missing parens around the lambda function, so it is not the same, because the call expression tries to call a number.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions