Uploaded image for project: 'Groovy'
  1. Groovy
  2. GROOVY-8613

GCE in elvis assignment evaluation

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    Description

      @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()
      

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            daniel_sun Daniel Sun
            daniilo Daniil Ovchinnikov
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment