Skip to content

Incorrect/unclear description of explicit conversions involving user-defined conversions #1542

@Nigel-Ecma

Description

@Nigel-Ecma

(This could be tackled alongside #1541.)

The clause §10.5.5 User-defined explicit conversions appears to define the semantics of the application of user-defined explicit conversions, this is incorrect. The semantics described cover explicit conversions, aka casts, which involve user-defined conversions whether declared as explicit or implicit – which is an important distinction!

As with #1541 §10.5.3 should be reviewed in the light of any changes made to §10.5.5.

Note the same does not apply to §10.5.4 User-defined implicit conversions, as that process is not applicable to explicit user-defined conversions.

This inaccuracy has recently caused some confusion “in the wild” however I’ll set the milestone to “C# 9” as there is no “C# 8 if it can be squeezed in” ;-) But feel free to tackled it before 9.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions