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

GString concatenation break equal operator transitive property

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.3.6
    • 2.3.10, 2.4.0-rc-1
    • groovy-runtime
    • None

    Description

      In the following script the third assertion fails

      w = 'world'
      str1 = "Hello $w"
      str1 += "!"
      str2 = "Hello $w!"
      str3 = 'Hello world!'
      
      assert str1 == str3
      assert str2 == str3
      assert str1 == str2 
      
      
      assert str1 == str2
             |    |  |
             |    |  Hello world!
             |    false
             Hello world!
      
      	at ConsoleScript9.run(ConsoleScript9:11)
      

      Attachments

        Activity

          People

            blackdrag Jochen Theodorou
            pablo72 paolo di tommaso
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: