[ https://issues.apache.org/jira/browse/GROOVY-8442?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16964689#comment-16964689 ]
Daniel Sun commented on GROOVY-8442: ------------------------------------ {quote}meta version for 3.x for scheduling work (with new grammar) - don't leave as fix version {quote} I will set the fix version to the latest released version > java.lang.VerifyError: Bad <init> method call from inside of a branch > --------------------------------------------------------------------- > > Key: GROOVY-8442 > URL: https://issues.apache.org/jira/browse/GROOVY-8442 > Project: Groovy > Issue Type: Bug > Components: Compiler > Affects Versions: 2.4.9 > Reporter: Peter Szanto > Assignee: Eric Milles > Priority: Major > Fix For: 2.5.8, 3.0.0-rc-1 > > > given this base class > {code} > abstract class AnimalBuilder { > def animal; > AnimalBuilder(def animal) { > this.animal = animal > } > } > {code} > This subclass works as expected > {code} > class CatBuilder extends AnimalBuilder { > CatBuilder() { > super(new Cat()); > } > } > {code} > but this > {code} > class CatBuilder2 extends AnimalBuilder { > CatBuilder2() { > super(createCat()); > } > private Cat createCat() { > new Cat() > } > } > {code} > Will result an > {code} > java.lang.VerifyError: Bad <init> method call from inside of a branch > Exception Details: > Location: > org/example/builder/CatBuilder2.<init>()V @25: invokespecial > Reason: > Error exists in the bytecode > {code} > The full example can be seen here > https://github.com/szantopeter/groovy-compile-failure2 -- This message was sent by Atlassian Jira (v8.3.4#803005)