You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@groovy.apache.org by "Dmitry Zhikharev (JIRA)" <ji...@apache.org> on 2018/01/29 13:04:00 UTC

[jira] [Created] (GROOVY-8462) ShortTypeHandling.castToString() is applied even when @CompileStatic is present

Dmitry Zhikharev created GROOVY-8462:
----------------------------------------

             Summary: 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: 2.6.0-alpha-2, 2.4.13, 2.5.0-beta-2, 3.0.0-alpha-1
            Reporter: Dmitry Zhikharev
         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, version 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
(v7.6.3#76005)