[ 
https://issues.apache.org/jira/browse/GROOVY-11861?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18061107#comment-18061107
 ] 

Jochen Theodorou commented on GROOVY-11861:
-------------------------------------------

In Groovy an assignment is like a cast and assignment, it may involve type 
transformation, also shortening in the non-static case. But in case of a method 
call shortening is not part of what Groovy does.

> method selection does not support narrowing of call args
> --------------------------------------------------------
>
>                 Key: GROOVY-11861
>                 URL: https://issues.apache.org/jira/browse/GROOVY-11861
>             Project: Groovy
>          Issue Type: Bug
>            Reporter: Eric Milles
>            Priority: Major
>
> Consider the following:
> {code:groovy}
> class C {
>   short s
> }
> new C(s: 42)
> new C().s = 42
> new C().setS(42)
> {code}
> The first two writes work fine.  The third throws "MissingMethodException: No 
> signature of method: setS for class: C is applicable for argument types: 
> (Integer) values: [42]"



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to