Fixed array generation expression, removed compat types as they are being remapped

This commit is contained in:
Samuele Lorefice
2025-01-22 18:11:09 +01:00
parent 9a949dbeab
commit 5f15635cd8
5 changed files with 2 additions and 83 deletions

View File

@@ -171,8 +171,8 @@ namespace CodeGenerator {
}
public static CodeExpression GenerateArrayInitExpression(CodeTypeReference type, IEnumerable<int> dimensions) {
string dims = string.Concat(dimensions.Select(d => $"[{d}]"));
return new CodeSnippetExpression($"new {type.BaseType}{dims}");
string dims = string.Concat(dimensions.Select(d => $"{d},"));
return new CodeSnippetExpression($"new {type.BaseType}[{dims}]");
}
private static CodeTypeConstructor GenerateStaticConstructor(CodeTypeDeclaration ctd) {