diff options
author | Araq <rumpf_a@web.de> | 2012-07-10 22:17:47 +0200 |
---|---|---|
committer | Araq <rumpf_a@web.de> | 2012-07-10 22:17:47 +0200 |
commit | 483f28d1cf4baedbce900bc8278e8508127351cc (patch) | |
tree | 951af23bbaba3531be7f782a250c07a0bb9cd0de /tests/compile | |
parent | 607f46a61afebc7a9e1ab7c66570b6573d91ff6c (diff) | |
download | Nim-483f28d1cf4baedbce900bc8278e8508127351cc.tar.gz |
fixes #147
Diffstat (limited to 'tests/compile')
-rw-r--r-- | tests/compile/timplictderef.nim | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/compile/timplictderef.nim b/tests/compile/timplictderef.nim new file mode 100644 index 000000000..99b0b645b --- /dev/null +++ b/tests/compile/timplictderef.nim @@ -0,0 +1,18 @@ +discard """ + output: "2" +""" + +type + TValue* {.pure, final.} = object of TObject + a: int + PValue = ref TValue + PPValue = ptr PValue + + +var x: PValue +new x +var sp: PPValue = addr x + +sp.a = 2 +if sp.a == 2: echo 2 # with sp[].a the error is gone + |