Skip to content

Importing C# symbols with a modreq but a missing IsReadOnly attribute should mark it as a use-site error #19951

@OmarTawfik

Description

@OmarTawfik

We need to add tests for this special case, and make sure that the compiler rejects it as a usesite error (if the attribute doesn't exist, then there is a problem with IL and this symbol should not be used).

Testing should cover:

  • method parameters
  • method return types
  • properties
  • indexers parameters
  • indexers return types
  • delegates parameters
  • delegates return types

Look for tests starting InAttributeModReqIsConsumedInRefCustomModifiersPosition_IL as a guide.

Found in #19658

Metadata

Metadata

Assignees

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions