Feat(type-system): land TY1 — Ty IR, union normalization, assignability (#41) #11
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/011-feat-type-system-land-ty1-ty-ir-union-normaliz"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Feat(type-system): land TY1 — Ty IR, union normalization, assignability (#41)
Along the way:
Touches 13 files:
docs/impl/resolution/N6-hir-lowering.md,docs/impl/resolution/README.md,docs/impl/slices.md,docs/impl/type-system/README.md,docs/impl/type-system/TY1-type-ir-and-assignability.md,src/rust/crates/ck_hir/src/expr.rsand 7 more.Yes. The commit messages carried me through all 13 files, which is not always true.
@ -5,0 +292,4 @@fn generics_are_invariant() {// List<Cat> is unrelated to List<Animal> even though Cat ∈ Animal.let animal = Ty::union([cat(), dog()]);assert!(!assignable(&list(cat()), &list(animal.clone())));assignableis cloned on what looks like a hot path. Is the ownership forced here, or can this borrow?It can borrow. The clone of
assignablewas left over from before the lifetime was threaded throughsrc/rust/crates/ck_types/src/lib.rs, and it is gone.