No, not yet anyhow. See Function over-specialization on unused parts of types · Issue #26834 · JuliaLang/julia · GitHub