-
Notifications
You must be signed in to change notification settings - Fork 263
(rosetta): incorrect translation of inferred types to c# #3027
Copy link
Copy link
Closed
Labels
bugThis issue is a bug.This issue is a bug.needs-triageThis issue or PR still needs to be triaged.This issue or PR still needs to be triaged.
Description
🐛 Bug Report
In some cases, variables with inferred types get translated as __object in typescript.
This seems to happen when the type signature on the method is any.
See example below.
================= 7fbf857fd1de77d132905edb0484ed62d5d56ab4fe814ae1a79d0bf91aa83f57 =================
const expected = {
Foo: 'Bar',
Baz: 5,
Qux: [ 'Waldo', 'Fred' ],
};
template.hasResourceProperties('Foo::Bar', expected);
----------- csharp -----------
__object expected = new Dictionary<string, object> {
{ "Foo", "Bar" },
{ "Baz", 5 },
{ "Qux", new [] { "Waldo", "Fred" } }
};
template.HasResourceProperties("Foo::Bar", expected);
The signature of the method used here is -
hasResourceProperties(type: string, props: any): voidReactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugThis issue is a bug.This issue is a bug.needs-triageThis issue or PR still needs to be triaged.This issue or PR still needs to be triaged.