You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@groovy.apache.org by "Daniil Ovchinnikov (JIRA)" <ji...@apache.org> on 2018/05/28 15:41:00 UTC
[jira] [Created] (GROOVY-8613) CCE in elvis assignment evaluation
Daniil Ovchinnikov created GROOVY-8613:
------------------------------------------
Summary: CCE 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
{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)