Types from WITX `use` statements are double included
Currently when the same type is imported multiple times into a WITX module by use statements, an error occurs saying that the type is defined twice.
Example:
a.witx
type foo = u8
b.witx
use { foo } from a
c.witx
use { foo } from a
use * from b
> Error: type "foo" defined twice.
It would be nice there was some way of handling this so that multiple WITX files could all import from one common source, while still importing from each other with star imports. This is especially important if you have the same type used in many different files, e.g. error codes.
Makes sense to me to implement! Right now the collision check is quite simple, purely based on names, but I agree that if the duplicate-ly imported name exactly matches the previous import (same source definition and all) I think it makes sense to allow that and keep it working.
The use feature has been temporarily removed, so I'm going to close this. Fixing this and other related issues will happened with a re-introduced version of use.