You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@groovy.apache.org by "Jochen Theodorou (Jira)" <ji...@apache.org> on 2023/12/31 18:57:00 UTC
[jira] [Commented] (GROOVY-11263) Analyze dead code
[ https://issues.apache.org/jira/browse/GROOVY-11263?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17801466#comment-17801466 ]
Jochen Theodorou commented on GROOVY-11263:
-------------------------------------------
[~daniel_sun] "It's better to avoid such dead code." I agree that it does not make sense here and that in general you do not want to have that. But I do find it quite nice to be able to just "return" when testing out things and not having to comment out all the code
> 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
>
> Groovy allows dead code after {{return}}, 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)