Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
carlosmiei committed Sep 12, 2024
1 parent f13f850 commit d20dadf
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/csharpTranspiler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -886,7 +886,7 @@ export class CSharpTranspiler extends BaseTranspiler {
}

printConcatCall(node, identation, name = undefined, parsedArg = undefined) {
return `${name}.Concat(${parsedArg}).ToList()`;
return `((string)${name}).Concat(${parsedArg}).ToList()`;
}

printToFixedCall(node, identation, name = undefined, parsedArg = undefined) {
Expand Down
2 changes: 1 addition & 1 deletion tests/csharpTranspiler.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -931,7 +931,7 @@ describe('csharp transpiling tests', () => {
});
test('should convert concat', () => {
const ts = "y.concat(z)";
const result = "y.Concat(x).ToList()";
const result = "((string)y).Concat(x).ToList()";
const output = transpiler.transpileCSharp(ts).content;
expect(output).toBe(result);
});
Expand Down

0 comments on commit d20dadf

Please sign in to comment.