/html/apps/

reply.github.com> 2022-10-06 13:16:50 +0800 committer GitHub <noreply@github.com> 2022-10-06 07:16:50 +0200 follow up #20109; remove `shallow` seqs/strings for ORC (#20502)' href='/ahoang/Nim/commit/tests/system/tnilconcats.nim?h=devel&id=723a71bd229cad3498f01c3095a10cf9f6c3255d'>723a71bd2 ^
f8fa94cb2 ^


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
           
                                                    






















                        


                                                                          

                       


                      
discard """
  output: '''@["", "", "", "", "", "", "", "meh"]'''
  exitcode: "0"
"""

when true:
  var ab: string
  ab &= "more"

  doAssert ab == "more"

  var x: seq[string]

  setLen(x, 7)

  x.add "meh"

  var s: string
  var z = "abc"
  var zz: string
  s &= "foo" & z & zz

  doAssert s == "fooabc"

  echo x

  # casting an empty string as sequence with shallow() should not segfault
  var s2: string
  when defined(gcRefc):
    shallow(s2)
  s2 &= "foo"
  doAssert s2 == "foo"