Fix getCustomPragmaVal on var fields

This commit is contained in:
LemonBoy 2019-02-05 15:24:19 +01:00 • committed by Andreas Rumpf
commit 26255c72fd
2 changed files with 7 additions and 1 deletions

View file

@ -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