summary refs log tree commit diff stats
path: root/tests/template
diff options
context:
space:
mode:
authorAraq <rumpf_a@web.de>2018-09-03 10:02:37 +0200
committerAraq <rumpf_a@web.de>2018-09-03 10:02:37 +0200
commit9e48999567d3d5c309262ce548dfe20893a207e8 (patch)
tree6a570c51605b4a5aaa1c597d04bf0b2bd00ea5ff /tests/template
parentef771cde1ae9cf2da9b39c7444a6cae98575d255 (diff)
downloadNim-9e48999567d3d5c309262ce548dfe20893a207e8.tar.gz
closes #4750
Diffstat (limited to 'tests/template')
-rw-r--r--tests/template/tprocparshadow.nim19
1 files changed, 19 insertions, 0 deletions
diff --git a/tests/template/tprocparshadow.nim b/tests/template/tprocparshadow.nim
index b99cd0b6c..de1c2d941 100644
--- a/tests/template/tprocparshadow.nim
+++ b/tests/template/tprocparshadow.nim
@@ -9,3 +9,22 @@ template something(name: untyped) =
 
 something(what)
 what(10)
+
+# bug #4750
+
+type
+  O = object
+    i: int
+
+  OP = ptr O
+
+template alf(p: pointer): untyped =
+  cast[OP](p)
+
+
+proc t1(al: pointer) =
+  var o = alf(al)
+
+proc t2(alf: pointer) =
+  var x = alf
+  var o = alf(x)