-
Notifications
You must be signed in to change notification settings - Fork 5.1k
Remove Assert in Method.MakeGeneric on Invalid Arg #116788
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
Remove Assert in Method.MakeGeneric on Invalid Arg #116788
Conversation
9752615
to
3768e58
Compare
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.
@scott-ferguson-unity can you get rid of the files in the out dir? Other than that, this LGTM.
@dotnet-policy-service agree company="Unity Technologies" |
The call to mono_class_inflate_generic_method_checked will set error when there are invalid types (e.g. typeof(void)/typeof(int*)) passed in. This should not be an assert, it should fall to the "Invalid generic arguments" message below. This does lose the error returned by mono_class_inflate_generic_method_checked but that error isn't user friendly. It would report be something like: "MVAR 1 cannot be expanded with type 0x1" Instead report the more readable error to the user. Fix: 71339
3768e58
to
c4ed2c4
Compare
@steveisok Sorry about those files, clearly wasn't paying attention! Should be good now. |
/ba-g Unclear wasm failure |
The call to
mono_class_inflate_generic_method_checked
will set error when there are invalid types (e.g.typeof(void)
/typeof(int*))
passed in. This should not be an assert, we should fall to the "Invalid generic arguments" message below. This does loose the error returned bymono_class_inflate_generic_method_checked
but that error isn't userfriendly. It would report be something like:
Instead report the more general/readable error to the user.
Fix: #71339.
Repro:
Result Before:
Result After: