commit 438b7015e7b452442f2b5fdff41061eef795b0ad
parent 9289e58122286cd48c764a294851c5695ead21e2
Author: Eyal Sawady <ecs@d2evs.net>
Date: Sat, 4 Sep 2021 09:58:31 +0000
Drop result type reduction algorithm description
We don't need it here now that it's part of the spec
Signed-off-by: Eyal Sawady <ecs@d2evs.net>
Diffstat:
1 file changed, 0 insertions(+), 10 deletions(-)
diff --git a/src/type_store.c b/src/type_store.c
@@ -972,16 +972,6 @@ type_store_lookup_tuple(struct type_store *store, struct type_tuple *values)
return type_store_lookup_type(store, &type);
}
-// Algorithm:
-// - Deduplicate and collect nested unions
-// - Merge *type with nullable *type
-// - Merge type with const type
-// - If one of the types is null:
-// - If there's more than one pointer type, error out
-// - If there's one pointer type, make it nullable and drop the null
-// - If there are no pointer types, keep the null
-// - If the resulting union only has one type, return that type
-// - Otherwise, return a tagged union of all the selected types
const struct type *
type_store_reduce_result(struct type_store *store, struct type_tagged_union *in)
{