Open lukekentwell opened 7 months ago
I just ran into this myself.
Odin: dev-2024-10-nightly:af9ae48
OS: Windows 10 Professional (version: 22H2), build 19045.4780
CPU: Intel(R) Core(TM) i5-4690K CPU @ 3.50GHz
RAM: 8140 MiB
Backend: LLVM 18.1.8
Minimal repro
Either :: union(T1, T2 : typeid)
{
T1,
T2, //Error: Duplicate variant type '$T2'
}
GetEither :: proc(first : $T1, second : $T2) -> Either(T1, T2)
{
return nil
}
main :: proc()
{
a : f32 = 12
b : string = "Error"
either := GetEither(a, b)
}
It compiles fine without GetEither
.
Context
Failure Information (for bugs)
When I attempt to run the below code I get the error "Duplicate variant type 'typeid'"
Steps to Reproduce
Create a new odin project and copy this code in: