Uh oh!
There was an error while loading. Please reload this page.
[mono][interp] Fix GetType called on ptr constrained to Nullable` - #61020
Conversation
ghost
commented
Oct 29, 2021
Tagging subscribers to this area: @BrzVlad Issue DetailsWe were statically optimizing this call to return the actual constrained class type, which is incorrect for nullables, because boxing of a nullable (as part of the constrained call) actually creates an object with the type of the nullable's value (or null if there is no value). Fixes #61007
|
lewing
commented
Oct 29, 2021
/backport to release/6.0 |
Started backporting to release/6.0: https://github.com/dotnet/runtime/actions/runs/1400673059 |
radical
commented
Oct 30, 2021
This needs a test. |
BrzVlad
commented
Oct 30, 2021
@radical Any recommendation where ? In the runtime tests ? |
radical
commented
Oct 31, 2021
Adding in runtime tests makes sense. |
We were statically optimizing this call to return the actual constrained class type, which is incorrect for nullables, because boxing of a nullable (as part of the constrained call) actually creates an object with the type of the nullable's value (or null if there is no value).
0e9493b to
989f46dCompareBrzVlad
commented
Nov 1, 2021
|
989f46d to
92ee613Comparelewing
commented
Nov 2, 2021
/backport to release/6.0 |
Started backporting to release/6.0: https://github.com/dotnet/runtime/actions/runs/1413414901 |
…tnet#61020) * [interp] Fix GetType called on ptr constrained to Nullable` We were statically optimizing this call to return the actual constrained class type, which is incorrect for nullables, because boxing of a nullable (as part of the constrained call) actually creates an object with the type of the nullable's value (or null if there is no value). * Add test for GetType call on ptr constrained to nullable
…1020) (#61305) * [interp] Fix GetType called on ptr constrained to Nullable` We were statically optimizing this call to return the actual constrained class type, which is incorrect for nullables, because boxing of a nullable (as part of the constrained call) actually creates an object with the type of the nullable's value (or null if there is no value). * Add test for GetType call on ptr constrained to nullable
We were statically optimizing this call to return the actual constrained class type, which is incorrect for nullables, because boxing of a nullable (as part of the constrained call) actually creates an object with the type of the nullable's value (or null if there is no value).
Fixes#61007