-
Notifications
You must be signed in to change notification settings - Fork 5.4k
Closed
Labels
Milestone
Description
In MemberReferenceResolver.cs we are throwing
throw new InvalidOperationException($"Cannot apply indexing with [,] to an object of type '{type}'");
Remove it and fix it for e.g. testcase:
[Fact]
public async Task EvaluateObjectIndexingMultidimensional() => await CheckInspectLocalsAtBreakpointSite(
"DebuggerTests.EvaluateLocalsWithIndexingTests", "EvaluateLocals", 12, "DebuggerTests.EvaluateLocalsWithIndexingTests.EvaluateLocals",
"window.setTimeout(function() { invoke_static_method ('[debugger-test] DebuggerTests.EvaluateLocalsWithIndexingTests:EvaluateLocals'); })",
wait_for_event_fn: async (pause_location) =>
{
var id = pause_location["callFrames"][0]["callFrameId"].Value<string>();
await EvaluateOnCallFrameAndCheck(id,
("f[\'a\', \'&\']", TString("a-&"))
);
});
public class TestEvaluate
{
public string this[char key1, char key2] => $"{key1}-{key2}";
}
and similar. Make sure that not only numeric indexes are supported but other schemes (as above: char) as well.
Reactions are currently unavailable