-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Update first-class Span speclet with LDM decisions #8241
Conversation
Co-authored-by: Charles Stoner <10732005+cston@users.noreply.github.com>
proposals/first-class-span-types.md
Outdated
@@ -50,6 +50,9 @@ An implicit span conversion permits `array_types`, `System.Span<T>`, `System.Rea | |||
|
|||
------ | |||
|
|||
Any Span/ReadOnlySpan types are considered applicable for the conversion if they match by their fully-qualified name. | |||
If they do not match the types that are selected by the compiler's well-known type resolution logic, a compile-time error is reported. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not what we decided? We won't check that, and we can't really specify it either, since "the compiler's well-known type resolution logic" isn't a thing in the spec.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, okay, thanks. I thought that was part of the option we discussed, but I might have misunderstood.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Then the question is how will we emit - do we need to find the operators on the Span types manually? It would be much easier to just use the well-known member machinery; and hence report an error if the Span type doesn't match the well-known type. Maybe that doesn't have to be specified, it can be an implementation detail like well-known types are. I could replace this sentence with something like:
Compiler implementation can report a compile-time error if the Span type from the conversion
does not match the "well-known" Span type that would be selected in other places by implementation-specific logic.
But I guess it might not be so difficult to find the required helpers.
No description provided.