[
https://issues.apache.org/jira/browse/GROOVY-9660?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17165203#comment-17165203
]
Paul King commented on GROOVY-9660:
-----------------------------------
I added code tags.
> generic type class extend tarit
> -------------------------------
>
> Key: GROOVY-9660
> URL: https://issues.apache.org/jira/browse/GROOVY-9660
> Project: Groovy
> Issue Type: Question
> Components: Groovy Console
> Affects Versions: 3.0.5
> Environment: groovy 3.0.5 + jdk1.8
> Reporter: zzy
> Priority: Major
> Labels: build
>
> *code example :*
> {code}
> trait Data {}
> class TestData implements Data {}
> class AbstractData<D extends Data>{ D data }
> def test = new AbstractData<TestData>()
> {code}
>
> *when i compile groovy,it compile failed:*
> {noformat}
> 1 compilation error:
> The type TestData is not a valid substitute for the bounded parameter <D
> extends Data>
> at line: 7, column: 29
> {noformat}
> Is this the wrong way to write it?
>
>
--
This message was sent by Atlassian Jira
(v8.3.4#803005)