summary refs log tree commit diff stats
path: root/tests/implicit/timplictderef.nim
diff options
context:
space:
mode:
Diffstat (limited to 'tests/implicit/timplictderef.nim')
-rw-r--r--tests/implicit/timplictderef.nim35
1 files changed, 0 insertions, 35 deletions
diff --git a/tests/implicit/timplictderef.nim b/tests/implicit/timplictderef.nim
deleted file mode 100644
index fcb647217..000000000
--- a/tests/implicit/timplictderef.nim
+++ /dev/null
@@ -1,35 +0,0 @@
-discard """
-  output: '''2
-88'''
-"""
-
-type
-  TValue* {.pure, final.} = object of RootObj
-    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
-
-# Test the new auto-deref a little
-
-{.experimental.}
-
-proc p(x: var int; y: int) = x += y
-
-block:
-  var x: ref int
-  new(x)
-
-  x.p(44)
-
-  var indirect = p
-  x.indirect(44)
-
-  echo x[]