Skip to content

Symbols should construct their own modifiers appropriately before looking into overridden symbols #20053

@OmarTawfik

Description

@OmarTawfik

For the following:

  • Methods
  • Properties
  • Indexers

They should be able to construct their own modifiers appropriately (for example, IsConst for ref-readonly signatures) on both parameters and return types. Later during construction, they should overwrite their own with the overridden signature if both (overriding and overridden symbols) have RefKind != None.

Reason for that change is that using the compilers API should return the right information about symbols and their modifiers even if there was a mismatch (and subsequently, an error).

Please add tests for both cases when the overriding is None and overridden is RefReadOnly and vice-versa. Also, when overridden symbol is not found. If they match, they should be copied, if not, they should not be copied.

Part of a comment on #19658

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions