Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
When resolving calls after recreating the IR from parsed input as a second pass the old code would inject a NOP where the CALL should go and replace it with a resolved CALL.
This was a problem when the call value was used as an argument to anothercall, as the NOP was taken rather than the CALL. Attempting to replace the NOP everywhere was very tricky (I couldn't actually manage it in the end).
A better (though still a bit hacky) approach now is to inject a CALL from the start, but to a dummy function and replace that function within the CALL in the resolving pass. This way any references to the call value are valid from the start.