-
Notifications
You must be signed in to change notification settings - Fork 4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Compiler Happily Emits Task<void> #1830
Comments
|
Despite this being an obvious bug, i wish it was legal to use void as a generic parameter. |
|
@AlgorithmsAreCool Feel free to file a feature request in dotnet/coreclr. |
|
@SLaks @AlgorithmsAreCool This is suggested in #234. |
|
Nice catch! :) |
…turn statement has a void expression. Fixes dotnet#1830
|
Let's say the CLR allowed |
|
@AdamSpeight2008 |
|
@AlekseyTs Can you "Verify" this please? |
Source:
This should not compile!
The IDE also happily reports that
tis aTask<void>.Running it throws a TypeLoadException:
The generic type 'System.Func1' was used with an invalid instantiation in assembly mscorlib`The text was updated successfully, but these errors were encountered: