[
https://issues.apache.org/jira/browse/GROOVY-8803?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17043478#comment-17043478
]
Tomasz Przybysz commented on GROOVY-8803:
-----------------------------------------
I haven't pointed out that this issue makes it impossible to co combine
delegating annotations in a handy way.
Neither {{@DelegatesTo(Foo.FooBuilder)}} nor {{@Delegate(Foo.FooBuilder)}}
compiles.
No way to make a {{class FooBuilderExtension extends Foo.FooBuilder}} compile
either.
These are really handy ways of working with generated Builder classes for
instance to create DSLs and extensions which aren't possible at the moment
apparently.
> Can't refer class declared with @Builder annotation
> ---------------------------------------------------
>
> Key: GROOVY-8803
> URL: https://issues.apache.org/jira/browse/GROOVY-8803
> Project: Groovy
> Issue Type: Bug
> Affects Versions: 2.5.2
> Reporter: Tomasz Przybysz
> Priority: Minor
>
> The following fails to compile:
> {code:java}
> import groovy.transform.builder.Builder
> @Builder
> class Foo {
> String bar
> }
> Foo.FooBuilder aBuilder = Foo.builder()
> {code}
> The compile error is:
> {quote}Error:(8, 16) Groovyc: unable to resolve class Foo.FooBuilder
> {quote}
> I'm not sure if it's a bug. Although seems it should be possible to refer a
> `@Builder` generated class as any other.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)