You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@groovy.apache.org by "Paul King (JIRA)" <ji...@apache.org> on 2019/01/16 12:08:01 UTC
[jira] [Closed] (GROOVY-8868) Static factory method does not
compile anymore with 2.5.3 (was ok with 2.4.x)
[ https://issues.apache.org/jira/browse/GROOVY-8868?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Paul King closed GROOVY-8868.
-----------------------------
> Static factory method does not compile anymore with 2.5.3 (was ok with 2.4.x)
> -----------------------------------------------------------------------------
>
> Key: GROOVY-8868
> URL: https://issues.apache.org/jira/browse/GROOVY-8868
> Project: Groovy
> Issue Type: Bug
> Affects Versions: 2.5.0, 2.5.2, 2.5.3, 2.5.4
> Reporter: Peti Koch
> Assignee: Paul King
> Priority: Critical
> Fix For: 3.0.0-alpha-4, 2.5.5
>
> Attachments: Screenshot.PNG
>
>
> I just tried to update our codebase from 2.4.15 to 2.5.3.
> This doesn't compile anymore:
> {noformat}
> @groovy.transform.CompileStatic
> @groovy.transform.Immutable
> class Foo {
> static Foo create(){
> return new Foo()
> }
> }{noformat}
> I get
> {noformat}
> ...
> > Task :compileTestGroovy
> startup failed:
> C:\Dev\Foo\src\test\groovy\Foo.groovy: 6: [Static type checking] - Cannot find matching method Foo#<init>(). Please check if the declared type is correct and if the method exists.
> @ line 6, column 10.
> return new Foo()
> ^
> 1 error
> > Task :compileTestGroovy FAILED
> ...{noformat}
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)