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

[jira] [Assigned] (GROOVY-8613) GCE in elvis assignment evaluation

     [ https://issues.apache.org/jira/browse/GROOVY-8613?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Daniel Sun reassigned GROOVY-8613:
----------------------------------

    Assignee: Daniel Sun

> GCE in elvis assignment evaluation
> ----------------------------------
>
>                 Key: GROOVY-8613
>                 URL: https://issues.apache.org/jira/browse/GROOVY-8613
>             Project: Groovy
>          Issue Type: Bug
>          Components: Static compilation, Static Type Checker
>    Affects Versions: 3.0.0-alpha-2
>            Reporter: Daniil Ovchinnikov
>            Assignee: Daniel Sun
>            Priority: Critical
>
> {code:java}
> @groovy.transform.CompileStatic
> def foo() {
>   def a = 0
>   a ?= 1
>   println a // 1
>   def b = 0
>   b ?= "hello"
>   println b // expected: "hello", actual: "GroovyCastException: Cannot cast 'String' to 'int'"
> }
> foo()
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)