groovy-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Paul King (JIRA)" <j...@apache.org>
Subject [jira] [Closed] (GROOVY-8951) Traits defining getter conflicts with generated getter (improvements for pre-compiled case)
Date Thu, 21 Feb 2019 06:19:02 GMT

     [ https://issues.apache.org/jira/browse/GROOVY-8951?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Paul King closed GROOVY-8951.
-----------------------------

> Traits defining getter conflicts with generated getter (improvements for pre-compiled
case)
> -------------------------------------------------------------------------------------------
>
>                 Key: GROOVY-8951
>                 URL: https://issues.apache.org/jira/browse/GROOVY-8951
>             Project: Groovy
>          Issue Type: Bug
>          Components: Stub generator / Joint compiler
>            Reporter: Keegan Witt
>            Assignee: Paul King
>            Priority: Major
>             Fix For: 2.5.6, 3.0.0-alpha-5
>
>          Time Spent: 0.5h
>  Remaining Estimate: 0h
>
> {code:java}
> class Foo { }
> trait GetFoo {
>     abstract Foo getFoo()
> }
> class BaseFooSpec {
>     Foo foo
> }
> class FooSpec extends BaseFooSpec implements GetFoo { }
> {code}
> Generates a stub for FooSpec with
> {code:java}
> public class FooSpec
>   extends BaseFooSpec  implements
>     GetFoo,    groovy.lang.GroovyObject {
> ;
> @groovy.transform.Generated() @groovy.transform.Internal() public  groovy.lang.MetaClass
getMetaClass() { return (groovy.lang.MetaClass)null;}
> @groovy.transform.Generated() @groovy.transform.Internal() public  void setMetaClass(groovy.lang.MetaClass
mc) { }
> @groovy.transform.Generated() @groovy.transform.Internal() public  java.lang.Object invokeMethod(java.lang.String
method, java.lang.Object arguments) { return null;}
> @groovy.transform.Generated() @groovy.transform.Internal() public  java.lang.Object getProperty(java.lang.String
property) { return null;}
> @groovy.transform.Generated() @groovy.transform.Internal() public  void setProperty(java.lang.String
property, java.lang.Object value) { }
> public abstract  Foo getFoo();
> }
> {code}
> Note the {{getFoo()}} is still {{abstract}} instead of using the getter generated from
_BaseFooSpec_.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Mime
View raw message