Skip to content

const modifier for parameters #558

@lars-reimann

Description

@lars-reimann

Is your feature request related to a problem?

Currently, we use the @Constant annotation to mark parameters as constant (i.e. a literal must be passed). This is an important concept, however, e.g. for partial evaluation or refined types, so a modifier might be better suited.

Desired solution

  • Add a const modifier for this purpose.
  • For annotations, show an info if the modifier is used, since it is implied. Or should we show an error if it's not used?
  • Error if lambda parameters have this modifier
  • Error if parameters of callable type have this modifier

Possible alternatives (optional)

No response

Screenshots (optional)

No response

Additional Context (optional)

No response

Metadata

Metadata

Assignees

Labels

releasedIncluded in a release

Type

No type

Projects

Status

✔️ Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions