tstringliteral.nim 268 B

123456789101112131415161718
  1. discard """
  2. matrix: "--mm:arc; --mm:orc"
  3. """
  4. block: # issue #24080
  5. var a = (s: "a")
  6. var b = "a"
  7. a.s.setLen 0
  8. b = a.s
  9. doAssert b == ""
  10. block: # issue #24080, longer string
  11. var a = (s: "abc")
  12. var b = "abc"
  13. a.s.setLen 2
  14. b = a.s
  15. doAssert b == "ab"