[
https://issues.apache.org/jira/browse/GROOVY-8245?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16115614#comment-16115614
]
ASF GitHub Bot commented on GROOVY-8245:
----------------------------------------
Github user asfgit closed the pull request at:
https://github.com/apache/groovy/pull/571
> @Newify(auto=false) causing error (in Groovy Web Console)
> ---------------------------------------------------------
>
> Key: GROOVY-8245
> URL: https://issues.apache.org/jira/browse/GROOVY-8245
> Project: Groovy
> Issue Type: Bug
> Reporter: Eric Milles
>
> When I run this with no {{auto=flase}} attribute or with {{auto=true}}, it
> runs successfully (in Groovy Web Console). When I run as below, I get a
> strange error: {code}
> java.lang.ExceptionInInitializerError
> at Script1.run(Script1.groovy:15)
> Caused by: groovy.lang.MissingMethodException: No signature of method: static
> Bar.Foo() is applicable for argument types: () values: []
> Possible solutions: any(), is(java.lang.Object), any(groovy.lang.Closure),
> use([Ljava.lang.Object;), use(java.util.List, groovy.lang.Closure),
> use(java.lang.Class, groovy.lang.Closure)
> at Bar.<clinit>(Script1.groovy:10)
> {code}
> {code}
> class Foo {
> Foo() {
> println 'new foo'
> }
> }
> @Newify(auto=false, value=Foo)
> class Bar {
> static {
> Foo foo = Foo()
> }
> static void method() {}
> }
> ​Bar.method()
> {code}
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)