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

Wisen Tanasa updated GROOVY-7536:
---------------------------------
    Description: 
Similar with GROOVY-7113 but the Trait contains property. Attached is the zip 
with modified source.

{code:title=src/main/groovy/demo/DemoTrait.groovy|borderStyle=solid}
package demo

trait DemoTrait {

    int myproperty

    int getMagicNumber() {
        42
    }
}
{code}

*Error message*
{code}
/Users/ceilfors/Downloads/traitinheritance/build/tmp/groovy-java-stubs/demo/DemoClass.java:10:
 error: DemoClass is not abstract and does not override abstract method 
setMyproperty(int) in DemoTrait
public class DemoClass
       ^
1 error
startup failed:
Compilation failed; see the compiler error output for details.

1 error
{code}

  was:
Similar with GROOVY-7113 but the Trait contains property. Attached is the zip 
with modified source.

{code:title=src/main/groovy/demo/DemoTrait.groovy|borderStyle=solid}
package demo

trait DemoTrait {

    int myproperty

    int getMagicNumber() {
        42
    }
}
{code}

*Error message*
{quote}
/Users/ceilfors/Downloads/traitinheritance/build/tmp/groovy-java-stubs/demo/DemoClass.java:10:
 error: DemoClass is not abstract and does not override abstract method 
setMyproperty(int) in DemoTrait
public class DemoClass
       ^
1 error
startup failed:
Compilation failed; see the compiler error output for details.

1 error
{quote}


> Problem with Java Stubs Related to a Trait with Property
> --------------------------------------------------------
>
>                 Key: GROOVY-7536
>                 URL: https://issues.apache.org/jira/browse/GROOVY-7536
>             Project: Groovy
>          Issue Type: Bug
>          Components: Stub generator / Joint compiler
>    Affects Versions: 2.4.4
>            Reporter: Wisen Tanasa
>         Attachments: traitinheritance GROOVY-7536.zip
>
>
> Similar with GROOVY-7113 but the Trait contains property. Attached is the zip 
> with modified source.
> {code:title=src/main/groovy/demo/DemoTrait.groovy|borderStyle=solid}
> package demo
> trait DemoTrait {
>     int myproperty
>     int getMagicNumber() {
>         42
>     }
> }
> {code}
> *Error message*
> {code}
> /Users/ceilfors/Downloads/traitinheritance/build/tmp/groovy-java-stubs/demo/DemoClass.java:10:
>  error: DemoClass is not abstract and does not override abstract method 
> setMyproperty(int) in DemoTrait
> public class DemoClass
>        ^
> 1 error
> startup failed:
> Compilation failed; see the compiler error output for details.
> 1 error
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to