# Explanation and examples for "Subtyping currently intentionally answers certain queries incorrectly for kind types"?

**URL:** <https://discourse.julialang.org/t/explanation-and-examples-for-subtyping-currently-intentionally-answers-certain-queries-incorrectly-for-kind-types/109722>\
**Category:** Internals & Design\
**Tags:** question, type\
**Created:** [February 5, 2024, 4:44am UTC](https://discourse.julialang.org/t/explanation-and-examples-for-subtyping-currently-intentionally-answers-certain-queries-incorrectly-for-kind-types/109722 "2024-02-05T04:44:24Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![nsajko](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/nsajko/32/221187_2.png) [@nsajko](https://discourse.julialang.org/u/nsajko)\
**Post date:** [February 5, 2024, 4:44am UTC](https://discourse.julialang.org/t/explanation-and-examples-for-subtyping-currently-intentionally-answers-certain-queries-incorrectly-for-kind-types/109722/1 "2024-02-05T04:44:24Z")

</div>

I noticed this in the Julia source:

> <https://github.com/JuliaLang/julia/blob/6defd59986503acc3891938be47563fd385fe2c6/base/compiler/typeutils.jl#L51-L55>

It was added in this PR:

> <https://github.com/JuliaLang/julia/pull/27736>
>
> This fixes https://github.com/JuliaLang/julia/issues/27078, https://github.com/j…revels/Cassette.jl/issues/42, and some other bugs with tuples.
> 
> I'm not at all a fan of my replacements for the tuple handling code here - I just need to get the aforementioned bugs fixed. It should be "more correct" than it was before (modulo any bugs I introduced...), but it feels like it's going to be slower w.r.t. to compilation, runtime, or both. I haven't done benchmarking yet, though. I would be \*\*extremely grateful\*\* for some tips on faster/cleaner alternatives (as long as they don't reintroduce the bugs I'm trying to fix). This might be another case in favor of making \`ntuple\` an intrinsic...EDIT: see comment below, moved the tuple changes out of this PR
> 
> @nanosoldier \`runbenchmarks(ALL, vs = ":master")\`

AFAIU `isnotbrokensubtype(a, b)` basically means “`a <: b` is probably valid”? But when is it not valid? I think some examples would help my understanding and enable being more sure about writing correct code.

On a more basic level, what are _kind types_ in Julia? I assume it refers to `DataType`, `Type`, `Union` and `UnionAll`? Is it just that? Wikipedia seems to have a page for this, but I’m not sure how relevant it is for Julia: [Kind (type theory) - Wikipedia](https://en.wikipedia.org/wiki/Kind_(type_theory))

I’m also curious about the “intentionally” part, what’s the rationale for intentionally breaking subtyping?

As a more specific question, can anyone give example inputs for which `typesplit` is broken:

> <https://github.com/JuliaLang/julia/blob/6defd59986503acc3891938be47563fd385fe2c6/base/promotion.jl#L137-L152>
