diff --git a/Project.toml b/Project.toml index 43acaff..e71a35e 100644 --- a/Project.toml +++ b/Project.toml @@ -1,7 +1,7 @@ name = "StructHelpers" uuid = "4093c41a-2008-41fd-82b8-e3f9d02b504f" authors = ["Jan Weidner and contributors"] -version = "0.1.5" +version = "1.0" [deps] ConstructionBase = "187b0558-2788-49d3-abe0-74a17ed4e7c9" diff --git a/src/StructHelpers.jl b/src/StructHelpers.jl index 795044d..18a6486 100644 --- a/src/StructHelpers.jl +++ b/src/StructHelpers.jl @@ -122,7 +122,8 @@ macro batteries(T, kw...) if val isa Bool elseif pname == :typesalt - if !(val isa Union{Nothing,Integer}) + typesalt = val + if !(typesalt isa Union{Nothing,Integer}) error("""`typesalt` must be literally `nothing` or an unsigned integer. Got: typesalt = $(repr(typesalt))::$(typeof(typesalt)) """)