Skip to content

An @__ctfe function should do CTFE in a runtime context #23295

Description

@ntrel

Instead of erroring:

int add(int a) @__ctfe => a + 2;

void main()
{
    int x = add(1); // currently errors, should work
}

@ibuclaw points out that would be equivalent to immediate functions
#22557 (comment)

Metadata

Metadata

Assignees

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