We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 3949eb7 + 931e0fb commit 6939610Copy full SHA for 6939610
env-model-generator/src/javaCode.ts
@@ -253,7 +253,7 @@ class Braces extends CodeElement {
253
254
public flatten(): string[] {
255
return [
256
- this.intro + " {",
+ this.intro ? this.intro + " {" : "{",
257
..._.flatMap(this.body, (block) => block.flatten()).map(indent),
258
"}",
259
];
@@ -262,6 +262,10 @@ class Braces extends CodeElement {
262
263
export class Block extends Braces implements Statement {
264
public isStatement: true = true;
265
+
266
+ public constructor(body: Statement[]) {
267
+ super("", body);
268
+ }
269
}
270
271
export class Method extends Braces implements Member {
0 commit comments