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

GString concatenation break equal operator transitive property

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.3.6
    • Fix Version/s: 2.3.10, 2.4.0-rc-1
    • Component/s: groovy-runtime
    • Labels:
      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

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

              Dates

              • Created:
                Updated:
                Resolved: