summary refs log tree commit diff stats
path: root/tests/magics
diff options
context:
space:
mode:
authorArne Döring <arne.doering@gmx.net>2018-10-30 17:15:37 +0100
committerGitHub <noreply@github.com>2018-10-30 17:15:37 +0100
commit9c6620eba1a2dc6a3220b53d58b25b82f18694fc (patch)
treeb468dca238e46928529818428f8e59f3715dad00 /tests/magics
parent7ae6b7e9a29824ca674d4b140573cf56d0a41ebe (diff)
parentfb75e3bb4947413ea44ef2f5486ff16fdbc3308c (diff)
downloadNim-9c6620eba1a2dc6a3220b53d58b25b82f18694fc.tar.gz
Merge pull request #9570 from b3liever/macrosfixname
Fix name set and get procs in macros (fixes #9569)
Diffstat (limited to 'tests/magics')
0 files changed, 0 insertions, 0 deletions
ght .nf { color: #0066bb; font-weight: bold } /* Name.Function */ .highlight .nl { color: #336699; font-style: italic } /* Name.Label */ .highlight .nn { color: #bb0066; font-weight: bold } /* Name.Namespace */ .highlight .py { color: #336699; font-weight: bold } /* Name.Property */ .highlight .nt { color: #bb0066; font-weight: bold } /* Name.Tag */ .highlight .nv { color: #336699 } /* Name.Variable */ .highlight .ow { color: #008800 } /* Operator.Word */ .highlight .w { color: #bbbbbb } /* Text.Whitespace */ .highlight .mb { color: #0000DD; font-weight: bold } /* Literal.Number.Bin */ .highlight .mf { color: #0000DD; font-weight: bold } /* Literal.Number.Float */ .highlight .mh { color: #0000DD; font-weight: bold } /* Literal.Number.Hex */ .highlight .mi { color: #0000DD; font-weight: bold } /* Literal.Number.Integer */ .highlight .mo { color: #0000DD; font-weight: bold } /* Literal.Number.Oct */ .highlight .sa { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Affix */ .highlight .sb { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Backtick */ .highlight .sc { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Char */ .highlight .dl { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Delimiter */ .highlight .sd { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Doc */ .highlight .s2 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Double */ .highlight .se { color: #0044dd; background-color: #fff0f0 } /* Literal.String.Escape */ .highlight .sh { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Heredoc */ .highlight .si { color: #3333bb; background-color: #fff0f0 } /* Literal.String.Interpol */ .highlight .sx { color: #22bb22; background-color: #f0fff0 } /* Literal.String.Other */ .highlight .sr { color: #008800; background-color: #fff0ff } /* Literal.String.Regex */ .highlight .s1 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Single */ .highlight .ss { color: #aa6600; background-color: #fff0f0 } /* Literal.String.Symbol */ .highlight .bp { color: #003388 } /* Name.Builtin.Pseudo */ .highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */ .highlight .vc { color: #336699 } /* Name.Variable.Class */ .highlight .vg { color: #dd7700 } /* Name.Variable.Global */ .highlight .vi { color: #3333bb } /* Name.Variable.Instance */ .highlight .vm { color: #336699 } /* Name.Variable.Magic */ .highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */
discard """
msg: '''
x.data = @[10]
y = @[11]
x.data = @[11]
y = @[10]'''
"""

# bug #2946

proc testSwap(): int {.compiletime.} =
  type T = object
    data: seq[int]
  var x: T
  x.data = @[10]
  var y = @[11]
  echo "x.data = ", x.data
  echo "y = ", y
  swap(y, x.data)
  echo "x.data = ", x.data
  echo "y = ", y
  result = 99

const something = testSwap()