Skip to content

Declare attributes on positional record property #44691

@RikkiGibson

Description

@RikkiGibson

It feels like it should be allowed to apply an attribute to the property associated with a positional record parameter. e.g.

// implicitly applies attribute to both parameter and property?
data class Record([MyAttr] string Prop);

or

data class Record([property: MyAttr] string Prop);

We should also consider nullable attributes.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions