Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Failing test: constructors with input
array{key: T}
and `array{key:…
… list<T>}` considered colliding In this test, Valinor considers two disjoint input types as colliding. Similar to #487 ( ffe0f0f ), 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> <!-- in this example, `Item` is singular, and needs to be handled as `Item` --> <Item><Price>123</Price></Item> </Invoice> <Invoice> <!-- in this example, `Item` is plural, and needs to be handled as `list<Item>` --> <Item><Price>456</Price></Item> <Item><Price>789</Price></Item> </Invoice> </Invoices> ``` In #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