[
https://issues.apache.org/jira/browse/GROOVY-11302?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Eric Milles updated GROOVY-11302:
---------------------------------
Description:
Consider the following:
{code:groovy}
trait T {
def <X> X m(x) {x}
@TypeChecked
def test() {
Number n = 1
n = this.<Object>m(n) // should fail STC
}
}
{code}
was:
Consider the following:
{code:groovy}
trait T {
def <X> X m(x) {x}
@TypeChecked
def test() {
Number n = 1
n = this.<Object>m(n) // should fail
}
}
{code}
> Method call with type args loses information within trait
> ---------------------------------------------------------
>
> Key: GROOVY-11302
> URL: https://issues.apache.org/jira/browse/GROOVY-11302
> Project: Groovy
> Issue Type: Bug
> Reporter: Eric Milles
> Assignee: Eric Milles
> Priority: Major
> Labels: generics, traits
>
> Consider the following:
> {code:groovy}
> trait T {
> def <X> X m(x) {x}
> @TypeChecked
> def test() {
> Number n = 1
> n = this.<Object>m(n) // should fail STC
> }
> }
> {code}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)