We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
For union's choices with non-generic parameter, if the parameter is struct, compiler shows an error.
Please provide the steps required to reproduce the problem
namespace Test.Unions { union Choice { Contains<bool> } }
Save the file. open the g.cs file and check the GetHashCode method in the Contains class.
I think the created class should check if the type is class or struct.
Not checking.
Editing the g.cs file is the only one workaround, but if the csunion is edited, the changes will be lost.
EDIT: use nullable tipes:
namespace Test.Unions { union Choice { Contains<bool?> } }
The text was updated successfully, but these errors were encountered:
A workaround that I found is to use nullable types. int? insteand int, bool? insteand bool.
Sorry, something went wrong.
No branches or pull requests
Description
For union's choices with non-generic parameter, if the parameter is struct, compiler shows an error.
Repro steps
Please provide the steps required to reproduce the problem
Save the file. open the g.cs file and check the GetHashCode method in the Contains class.
Expected behavior
I think the created class should check if the type is class or struct.
Actual behavior
Not checking.
Known workarounds
Editing the g.cs file is the only one workaround, but if the csunion is edited, the changes will be lost.
EDIT: use nullable tipes:
The text was updated successfully, but these errors were encountered: