Skip to content
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

[wasm] [debugger] Evaluation of methods on enums #92263

Merged
merged 3 commits into from
Sep 21, 2023

Conversation

ilonatommy
Copy link
Member

@ilonatommy ilonatommy commented Sep 19, 2023

Fixes #69299.

  • Adding tests for calling methods on enums.
  • Fixing evaluation of ToString overload with parameters and potentially other functions that might have empty-named parameter handles in method signature.

Original error:

System.IndexOutOfRangeException: Index was outside the bounds of the array

Reason:
parameter handle array and methodSignature.ParameterTypes array were not in sync, handle array had 3 elements, one of them invalid (with empty name) while method signature types had 2 elements. When we ignore invalid handles, the logic works fine. https://learn.microsoft.com/en-us/dotnet/api/system.enum.tostring

Out of scope:

@ghost
Copy link

ghost commented Sep 19, 2023

Tagging subscribers to this area: @thaystg
See info in area-owners.md if you want to be subscribed.

Issue Details

Fixes #69299.

Original error:

System.IndexOutOfRangeException: Index was outside the bounds of the array

Reason:
parameter handle array and methodSignature.ParameterTypes array were not in sync, handle array had 3 elements, one of them invalid (with empty name) while method signature types had 2 elements. When we ignore invalid handles, the logic works fine.

Out of scope:

Author: ilonatommy
Assignees: -
Labels:

area-Debugger-mono

Milestone: -

@ilonatommy ilonatommy added the arch-wasm WebAssembly architecture label Sep 19, 2023
@ghost
Copy link

ghost commented Sep 19, 2023

Tagging subscribers to 'arch-wasm': @lewing
See info in area-owners.md if you want to be subscribed.

Issue Details

Fixes #69299.

Original error:

System.IndexOutOfRangeException: Index was outside the bounds of the array

Reason:
parameter handle array and methodSignature.ParameterTypes array were not in sync, handle array had 3 elements, one of them invalid (with empty name) while method signature types had 2 elements. When we ignore invalid handles, the logic works fine. https://learn.microsoft.com/en-us/dotnet/api/system.enum.tostring

Out of scope:

Author: ilonatommy
Assignees: ilonatommy
Labels:

arch-wasm, area-Debugger-mono

Milestone: -

@ilonatommy ilonatommy requested a review from radical September 20, 2023 09:45
@ilonatommy ilonatommy merged commit 3551112 into dotnet:main Sep 21, 2023
@ghost ghost locked as resolved and limited conversation to collaborators Oct 21, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
arch-wasm WebAssembly architecture area-Debugger-mono
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[wasm] [debugger] Evaluation of methods on enums
3 participants