Shadowing is allowed for importing types
jfmengels opened this issue · 1 comments
jfmengels commented
Quick Summary: It is possible to shadow types, even though this is discouraged, and usually a compiler error
SSCCE
import A exposing (SomeType)
import B exposing (SomeType)
a : SomeType
a = B.valuemodule A exposing (SomeType, value)
type SomeType = SomeType
value = SomeTypemodule B exposing (SomeType, value)
type SomeType = SomeType
value = SomeType- Elm: 0.19.1
- Browser: NA
- Operating System: NA
Additional Details
This can be confusing, because it is not clear which SomeType is actually chosen. The order of imports seem to be deciding this.
This kind of shadowing is not as problematic as for functions or values, but I think there is value in keeping this consistent.
github-actions commented
Thanks for reporting this! To set expectations:
- Issues are reviewed in batches, so it can take some time to get a response.
- Ask questions in a community forum. You will get an answer quicker that way!
- If you experience something similar, open a new issue. We like duplicates.
Finally, please be patient with the core team. They are trying their best with limited resources.