Skip to content

Commit

Permalink
Java test compiler: reset output variable
Browse files Browse the repository at this point in the history
  • Loading branch information
x0k committed Aug 9, 2024
1 parent 850883f commit f7a2312
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions apps/ppp/src/adapters/runtime/java/test-compiler-factory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ export class JavaTestCompilerFactory {
this.output = output;
}
protected override getNatives(input: I): Record<string, Function> {
this.output = undefined;
return nativesFactory(input, this.saveOutput.bind(this));
}
protected override getResult(): O {
Expand All @@ -64,6 +65,8 @@ export class JavaTestCompilerFactory {
if (files.length !== 1) {
throw new Error("Compilation of multiple files is not implemented");
}
// TODO: Fix handling compilation errors or at least remove previous
// compilation output
await compiler.compile(
ctx,
`${files[0].content}
Expand Down

0 comments on commit f7a2312

Please sign in to comment.