summary refs log tree commit diff stats
path: root/tests
diff options
context:
space:
mode:
authorLemonBoy <thatlemon@gmail.com>2019-02-05 15:24:19 +0100
committerAndreas Rumpf <rumpf_a@web.de>2019-02-06 11:34:55 +0100
commit26255c72fd94da57c7208dc84e027a5de6693605 (patch)
tree5da2378b6ade6d3b151902f881e8a1bde67ee1d6 /tests
parentc174d0924553a4a5252f42b39d2163053e8ea359 (diff)
downloadNim-26255c72fd94da57c7208dc84e027a5de6693605.tar.gz
Fix getCustomPragmaVal on `var` fields
Diffstat (limited to 'tests')
-rw-r--r--tests/pragmas/tcustom_pragma.nim5
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/pragmas/tcustom_pragma.nim b/tests/pragmas/tcustom_pragma.nim
index e04d3de26..7f781f6f1 100644
--- a/tests/pragmas/tcustom_pragma.nim
+++ b/tests/pragmas/tcustom_pragma.nim
@@ -61,6 +61,11 @@ block: # A bit more advanced case
 
     assert hasCustomPragma(type(s.field), defaultValue)
 
+  proc foo(s: var MySerializable) =
+    static: assert(s.a.getCustomPragmaVal(defaultValue) == 5)
+
+  foo(s)
+
 block: # ref types
   type
     Node = object of RootObj