diff options
author | SeekingBlues <51911626+SeekingBlues@users.noreply.github.com> | 2023-01-31 10:32:57 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-01-31 10:32:57 -0500 |
commit | 86317c7e7f1a5b24d27742e0c2223bbdadfd4dac (patch) | |
tree | c6183a80c3ebdc9a80f84e1b1c965c48c988283c /lib/compilers/java.ts | |
parent | a16cb5a0cf7c5997efdd85ddfa2dfcb8be86d676 (diff) | |
download | compiler-explorer-86317c7e7f1a5b24d27742e0c2223bbdadfd4dac.tar.gz compiler-explorer-86317c7e7f1a5b24d27742e0c2223bbdadfd4dac.zip |
Fix internal error on Java compilation (#4668)gh-6082
Diffstat (limited to 'lib/compilers/java.ts')
-rw-r--r-- | lib/compilers/java.ts | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/lib/compilers/java.ts b/lib/compilers/java.ts index c3a40f402..4a01fdc76 100644 --- a/lib/compilers/java.ts +++ b/lib/compilers/java.ts @@ -105,12 +105,11 @@ export class JavaCompiler extends BaseCompiler { }), ); - const merged = {asm: [] as ParsedAsmResultLine[][]}; + const merged: ParsedAsmResult = {asm: []}; for (const result of results) { const asmBackup = merged.asm; Object.assign(merged, result); - merged.asm = asmBackup; - merged.asm.push(result.asm); + merged.asm = [...asmBackup, ...result.asm]; } result.asm = merged.asm; @@ -241,7 +240,7 @@ export class JavaCompiler extends BaseCompiler { } // result.asm is an array of javap stdouts - const parseds = result.asm.map(asm => this.parseAsmForClass(asm)); + const parseds = result.asm.map(asm => this.parseAsmForClass(asm.text)); // Sort class file outputs according to first source line they reference parseds.sort((o1, o2) => o1.firstSourceLine - o2.firstSourceLine); |