diff --git a/src/Parser.jl b/src/Parser.jl index 6bc5df2..ca9f33a 100644 --- a/src/Parser.jl +++ b/src/Parser.jl @@ -415,9 +415,9 @@ function unparameterize_type(T::Type) end # Workaround for slow dynamic dispatch for creating objects -const DEFAULT_PARSERCONTEXT = ParserContext{Dict{String, Any}, Int64, false, nothing}() +const DEFAULT_PARSERCONTEXT = ParserContext{Dict{String, Any}, Int64, true, nothing}() function _get_parsercontext(dicttype, inttype, allownan, null) - if dicttype == Dict{String, Any} && inttype == Int64 && !allownan + if dicttype == Dict{String, Any} && inttype == Int64 && allownan && null === nothing DEFAULT_PARSERCONTEXT else ParserContext{unparameterize_type(dicttype), inttype, allownan, null}.instance