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)

Reply via email to