Skip to content

Commit c1d01ad

Browse files
authored
Merge pull request #5 from jw3126/typesalt
Fix typesalt error msg
2 parents c316e30 + 2786583 commit c1d01ad

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

Project.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name = "StructHelpers"
22
uuid = "4093c41a-2008-41fd-82b8-e3f9d02b504f"
33
authors = ["Jan Weidner <[email protected]> and contributors"]
4-
version = "0.1.5"
4+
version = "1.0"
55

66
[deps]
77
ConstructionBase = "187b0558-2788-49d3-abe0-74a17ed4e7c9"

src/StructHelpers.jl

+2-1
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)