Skip to content

Normative use of a .NET constant not required by this C# spec #1479

@RexJaeschke

Description

@RexJaeschke

[This issue was spun-off from Issue #1378 sub-issue 7.]

In 23.5.6.2, "The CallerLineNumber attribute,", we have the following:

The attribute System.Runtime.CompilerServices.CallerLineNumberAttribute is allowed on optional parameters when there is a standard implicit conversion (§10.4.2) from the constant value int.MaxValue to the parameter’s type. This ensures that any non-negative line number up to that value can be passed without error.

However, int.MaxValue is not part of this specification. How might we reword this normative text to get around that? Or might we add the minima/maxima constants for the built-in types?

Metadata

Metadata

Assignees

Labels

type: clarityWhile not technically incorrect, the Standard is potentially confusing

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions