-- [E006] Union Duplicate Warning: ----------------
1 | Int | Int
| ^^ ^^
| `Int` declared twice in union, consider removing one occurence
1 warning found
I'm not sure if this is actionable as there may be cases where it'd be desirable, with generics for example
type IntOr[T] = Int | T
but at least for concrete types I think it'd be a good warning to declutter the code (mostly an issue with long unions, and/or type alias)
Compiler version
3.4.2
Minimized example
Output Error/Warning message
No warning
Suggested improvement
I'm not sure if this is actionable as there may be cases where it'd be desirable, with generics for example
but at least for concrete types I think it'd be a good warning to declutter the code (mostly an issue with long unions, and/or type alias)