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

Daniel Sun commented on GROOVY-8462:
------------------------------------

Fixed on master; added a regression test in 
e281b1f23fcaf85d3eade94909f612c793bf58f2 
(https://github.com/apache/groovy/commit/e281b1f23fcaf85d3eade94909f612c793bf58f2).

> ShortTypeHandling.castToString() is applied even when @CompileStatic is 
> present
> -------------------------------------------------------------------------------
>
>                 Key: GROOVY-8462
>                 URL: https://issues.apache.org/jira/browse/GROOVY-8462
>             Project: Groovy
>          Issue Type: Bug
>          Components: Static Type Checker
>    Affects Versions: 3.0.0-alpha-1, 2.5.0-beta-2, 2.4.13, 2.6.0-alpha-2
>            Reporter: Dmitry Zhikharev
>            Assignee: Daniel Sun
>            Priority: Major
>             Fix For: 7.0.0-alpha-1
>
>         Attachments: Test.class, Test.groovy
>
>
> Even when 
>  {{@CompileStatic}} is present on the class, 
> {{ShortTypeHandling.castToString()}} is applied to RHS of the expression when 
> LHS is of type String.
> I've attached a test class and the compilation result (compiled with groovyc 
> 2.4.13. Versions 2.5.0-beta-2, 2.6.0-alpha-2, 3.0.0-alpha-1 yielded same 
> results).



--
This message was sent by Atlassian Jira
(v10.3.26#10030026)

Reply via email to