From 26255c72fd94da57c7208dc84e027a5de6693605 Mon Sep 17 00:00:00 2001 From: LemonBoy Date: Tue, 5 Feb 2019 15:24:19 +0100 Subject: Fix getCustomPragmaVal on `var` fields --- tests/pragmas/tcustom_pragma.nim | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'tests') 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 -- cgit 1.4.1-2-gfad0