eric-milles commented on PR #2023:
URL: https://github.com/apache/groovy/pull/2023#issuecomment-1881861904

   > dead code analysis, as its name shown, it just traverses AST and does not 
change the AST, so no tranforming [sic] changes involved.
   
   This was understood.  The point is that if you add a compiler error you may 
fail code that previously compiled.  A compiler warning allows the user to be 
notified but continue using code unchanged.  Also, you scan the AST at a 
specific point in time.  If later AST transformations occur that address the 
dead code scenarios, you have false positive.
   
   I'm just trying to have you describe your reasoning for when to do the 
analysis.  Even the class generator does a bit of instruction re-ordering that 
may or may not introduce dead code paths.  It seems the goal of this change is 
to identify any dead statements explicitly represented in the source file.  If 
that is indeed the case, it would be good to state all of this in the original 
problem description.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to