[
https://issues.apache.org/jira/browse/GROOVY-12035?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Daniel Sun closed GROOVY-12035.
-------------------------------
Fix Version/s: 6.0.0-alpha-2
Assignee: Daniel Sun
Resolution: Fixed
> Avoid emitting unreachable GOTO in if/else bytecode generation
> --------------------------------------------------------------
>
> Key: GROOVY-12035
> URL: https://issues.apache.org/jira/browse/GROOVY-12035
> Project: Groovy
> Issue Type: Improvement
> Reporter: Daniel Sun
> Assignee: Daniel Sun
> Priority: Major
> Fix For: 6.0.0-alpha-2
>
>
> StatementWriter.writeIfElse currently emits GOTO exitPath unconditionally
> whenever an else branch exists. If the if branch is already non-fallthrough
> (e.g., return, throw, or nested abrupt control flow), that jump is
> unreachable and introduces dead bytecode in the generated method.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)