[
https://issues.apache.org/jira/browse/GROOVY-9673?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Daniel Sun updated GROOVY-9673:
-------------------------------
Fix Version/s: 3.0.6
> GroovyCastException when using Trait.super.name = ... with multiple setters
> ---------------------------------------------------------------------------
>
> Key: GROOVY-9673
> URL: https://issues.apache.org/jira/browse/GROOVY-9673
> Project: Groovy
> Issue Type: Bug
> Reporter: Eric Milles
> Assignee: Eric Milles
> Priority: Major
> Fix For: 4.0.0-alpha-1, 3.0.6
>
> Time Spent: 20m
> Remaining Estimate: 0h
>
> Consider the following:
> {code:groovy}trait T {
> def setX(Number n) {
> println 'Number'
> }
> def setX(String s) {
> println 'String'
> }
> }
> class C implements T {
> void test() {
> T.super.x = 'x'
> }
> }
> new C().test()
> {code}
> "T.super.x = 'x'" should drive {{setX(String)}} but instead targets the
> Number overload and fails with GroovyCastException.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)