dotnet / dotnet/csharpstandard

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

Open
#1,479 2 comments 0 reactions 1 assignee Claimed by @RexJaeschke View on GitHub
type: clarity
Dominant language
C#
Stars
815
Forks
99
Avg merge
1d 14h
Merged PRs (30d)
16

Description

[This issue was spun-off from Issue #1378 [sub-issue 7](https://github.com/dotnet/csharpstandard/issues/1378#issuecomment-3094642231).]

In [23.5.6.2, "The CallerLineNumber attribute,"](https://github.com/dotnet/csharpstandard/blob/draft-v8/standard/attributes.md#23562-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](conversions.md#1042-standard-implicit-conversions)) 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?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.