Skip to content

Commit 19403cb

Browse files
committed
fix typesalt error msg
1 parent c316e30 commit 19403cb

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/StructHelpers.jl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,8 @@ macro batteries(T, kw...)
122122
if val isa Bool
123123

124124
elseif pname == :typesalt
125-
if !(val isa Union{Nothing,Integer})
125+
typesalt = val
126+
if !(typesalt isa Union{Nothing,Integer})
126127
error("""`typesalt` must be literally `nothing` or an unsigned integer. Got:
127128
typesalt = $(repr(typesalt))::$(typeof(typesalt))
128129
""")

0 commit comments

Comments
 (0)