-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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] Support indexing by value type schema #92334
Conversation
Tagging subscribers to this area: @thaystg Issue Details
while in other scenarios, the nesting in enums do not occur and values look e.g. like this:
Because we want In
|
What are the cases when these two separate forms are emitted? Why not just one? |
Failures after merge with main: Reason:
all types: class Indexer , enum EnumIndexer and struct StructIndexer are decoded as "object", even though ElementType defines ValueType and we would expect the two latter to return ValueType:
As a consequence, when we evaluate indexing by struct: f[StructIndexer] and use CheckParametersCompatibility
to check compatibility of method get_Items(Indexer) , where indexObject is:
we are not able to detect type incompatibility (struct cannot be passed to
instead of:
|
Nested result:
Non-nested:
When we fix the passed argument, we can revert try-catch (and we stay with nested version everywhere). |
Update to this question after reverting the try-catch. Test that fails: Reason:
We could change the static members resolution behavior to be nested but it seems wrong and artificial. I think it will be better to go back to 2-version handling instead, @radical. |
Draft Pull Request was automatically closed for 30 days of inactivity. Please let us know if you'd like to reopen it. |
Fixes partially #77536.
SyntaxNode
returnsIdentifierNameSyntax
value that is nested like this:while in other scenarios, the nesting in enums do not occur and values look e.g. like this:
Because we want
ConvertJSToCSharpLocalVariableAssignment
to handle both cases, try-catch expression was added (checking type with "is" keyword does not work here as we are casting and exception happens in the cast).In
GetVariableDefinitions
we handle enum case separately as a workaround to the following:In the original version of code, we would produce variable definition that looks like this:
DebuggerTests.castToEnumTypeThatIsDefinedInExternalAssembly enumIdx = (DebuggerTests.castToEnumTypeThatIsDefinedInExternalAssembly) 0;
Error produced when we use this approach implies that we are missing the assembly with Enum type definition passed as reference to the script:
The type or namespace name 'DebuggerTests' could not be found (are you missing a using directive or an assembly reference?)",
Adding pdbs that are stored in
DebugStore.assemblies
to the Roslyn's script did not affect the error message, so I used the workaround of passing numeric value of enum instead.