Replies: 2 comments
-
This looks to be a language request. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Version Used: Compiler version: '4.5.0-2.22580.13 (ea0b6351)'. Language version: 11.0.
Even a simple program like below using
Span<T>
will fail in the face of implicit cast. This means we basically have to have bothSpan<T>
andReadOnlySpan<T>
overloads for all methods relevant for this which is a huge hassle. This of course extends to other cases not justSpan<>
but it has become quite pervasive with the introduction of spans and read only spans, since implicit casts are everywhere now.Diagnostic Id:
CS0411
Expected Behavior: Infer the type! 🙏 Especially when the implicit type conversion is clear (e.g. there is just one or something).
Actual Behavior: Compile error.
PS: This probably has been reported before, but I could not find any existing issue probably due to lack of search skills. Or it might have to be reported on
csharplang
, I don't know. 😅Beta Was this translation helpful? Give feedback.
All reactions