diff --git a/src/msg.jl b/src/msg.jl index 701e7c7..9df333b 100644 --- a/src/msg.jl +++ b/src/msg.jl @@ -158,7 +158,7 @@ function trysetproperty!(s::Message, p::Symbol, v) hasfield(typeof(s), p) || return s ftype = fieldtype(typeof(s), p) ftype === Symbol && (v = Symbol(v)) - ftype === Vector{UInt8} && v isa Vector{Int8} && (v = reinterpret(UInt8, v)) + Vector{UInt8} <: ftype && v isa Vector{Int8} && (v = reinterpret(UInt8, v)) if v === nothing ftype === Float32 && (v = NaN32) ftype === Float64 && (v = NaN64)