From 6b6bf9a8eed7f0656ffa0d698c7cb6a0e4216f6a Mon Sep 17 00:00:00 2001 From: kalsprite Date: Tue, 11 Aug 2026 21:07:53 -0700 Subject: [PATCH] clarify shared fields behavior --- base/intrinsics/intrinsics.odin | 2 ++ 1 file changed, 2 insertions(+) diff --git a/base/intrinsics/intrinsics.odin b/base/intrinsics/intrinsics.odin index d91bc2e79..c4ffd02dc 100644 --- a/base/intrinsics/intrinsics.odin +++ b/base/intrinsics/intrinsics.odin @@ -251,6 +251,8 @@ type_merge :: proc($U, $V: typeid) -> typeid where type_is_union(U), type_is_uni type_integer_to_unsigned :: proc($T: typeid) -> type where type_is_integer(T), !type_is_unsigned(T) --- type_integer_to_signed :: proc($T: typeid) -> type where type_is_integer(T), type_is_unsigned(T) --- +// Directional: true when U contains every field of V, matched on name and type. +// Swapping the arguments can change the answer, and an empty V will return true. type_has_shared_fields :: proc($U, $V: typeid) -> bool where type_is_struct(U), type_is_struct(V) ---