mirror of
https://github.com/Eaglercraft-TeaVM-Fork/eagler-teavm.git
synced 2024-12-22 16:14:10 -08:00
Fix bug in metaprogramming API
This commit is contained in:
parent
378111d767
commit
92403f9ec0
|
@ -681,6 +681,7 @@ public class CompositeMethodGenerator {
|
|||
BasicBlock target = program.basicBlockAt(returnBlockIndex);
|
||||
|
||||
if (valueToReturn != null) {
|
||||
Variable valueToReturnResolved = var(valueToReturn);
|
||||
if (resultVar == null) {
|
||||
resultVar = program.createVariable();
|
||||
resultPhi = new Phi();
|
||||
|
@ -689,7 +690,7 @@ public class CompositeMethodGenerator {
|
|||
}
|
||||
Incoming incoming = new Incoming();
|
||||
incoming.setSource(program.basicBlockAt(blockIndex));
|
||||
incoming.setValue(var(valueToReturn));
|
||||
incoming.setValue(valueToReturnResolved);
|
||||
resultPhi.getIncomings().add(incoming);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user