Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test: add test for non-intersecting hashmap type constructors
In this test, Valinor considers two disjoint input types as colliding. Similar to CuyZ#487, this scenario was detected while trying to map multiple constructors for XML structures that may present different data depending on singular/plural entries found: ```xml <Invoices> <Invoice> <!-- `Item` is singular, and needs to be handled as `Item` --> <Item><Price>123</Price></Item> </Invoice> <Invoice> <!-- `Item` is plural, and needs to be handled as `list<Item>` --> <Item><Price>456</Price></Item> <Item><Price>789</Price></Item> </Invoice> </Invoices> ``` In CuyZ#487, we attempted to map a single constructor using `array{foo: T|list<T>}`, while in this patch, we found the issue because we attempted to attack the problem by declaring separate constructors that would work on `array{foo: T}` and `array{foo: list<T>}` disjointly, but failed to do so due to aggressive collision detection logic. Initially discovered by @Tigerman55
- Loading branch information