[
https://issues.apache.org/jira/browse/GROOVY-12066?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Paul King updated GROOVY-12066:
-------------------------------
Description:
{code:groovy}
import groovy.contracts.Invariant
class Outer {
@Invariant({ value >= 0 })
static class Inner { int value = 1 }
}
new Outer.Inner()
{code}
> @Invariant on a static nested class without an explicit constructor fails
> compilation with "BUG! exception in 'instruction selection' ... statement is
> null
> -----------------------------------------------------------------------------------------------------------------------------------------------------------
>
> Key: GROOVY-12066
> URL: https://issues.apache.org/jira/browse/GROOVY-12066
> Project: Groovy
> Issue Type: Bug
> Components: groovy-contracts
> Reporter: Paul King
> Assignee: Paul King
> Priority: Major
>
> {code:groovy}
> import groovy.contracts.Invariant
> class Outer {
> @Invariant({ value >= 0 })
> static class Inner { int value = 1 }
> }
> new Outer.Inner()
> {code}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)