[
https://issues.apache.org/jira/browse/GROOVY-11263?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17801625#comment-17801625
]
ASF GitHub Bot commented on GROOVY-11263:
-----------------------------------------
daniellansun commented on PR #2023:
URL: https://github.com/apache/groovy/pull/2023#issuecomment-1873540757
@eric-milles
As we all know, source code is meant for developers to read, and the less
redundant code there is, the more developer-friendly it becomes.
Admittedly, it's challenging to cover all scenarios of dead code, but at
least we can support some common ones and gradually improve, which aligns with
the principle of program evolution.
As for ASM's analysis of dead code, at least I haven't seen any relevant API
it offers. If you have any new findings, please share them with us. Thanks in
advance.
> Analyze dead code
> -----------------
>
> Key: GROOVY-11263
> URL: https://issues.apache.org/jira/browse/GROOVY-11263
> Project: Groovy
> Issue Type: Improvement
> Reporter: Daniel Sun
> Priority: Major
> Labels: breaking_change
> Fix For: 5.x
>
>
> Groovy allows dead code after {{throw}}, {{return}}, {{break}} and
> {{continue}}, e.g.
> {code:java}
> def m() {
> return
> def a = 1
> }
> {code}
> It's better to avoid such dead code.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)