Thanks,
I will try that approach, I’ve tried limiting the uncertainty in one example here:
function extract_op_flags(args::Dict{Symbol,Any}, flags::Vararg{Symbol})
bitflags = 0x00
@inbounds for i in eachindex(flags)
flag = Bool(args[flags[i]])
bitflags |= reinterpret(UInt8, flag) << (i - 1)
end
return bitflags
end
I stop the uncertainty arising from the fact the dict has Any as a value type by wrapping the indexing of the dictionary with an explicit conversion to Bool. Not sure if this or a type assertion like flag::Bool = args[flags[i]] is preferred.