# Is anyone having issues with sum types in nimony ? $ nimony --version 0.6.3 # i have this code import std/syncio type MyOpt[T] = object case of MySome: value: T of MyNone: discard func tostring[T](mo: MyOpt[T]): string = case mo of MySome(x): "MySome { " & $x & " }" of MyNone: "MyNone" when isMainModule: let m = MySome(value: "hey") echo tostring(m) # with this error $ nimony c -r ./test.nim test.nim(13, 31) Error: Type mismatch at [position] $(x) [1] expected: uint64 but got: T (declared in nimony/lib/std/system.nim(81, 1)) [1] expected: int64 but got: T (declared in nimony/lib/std/system.nim(103, 1)) [1] expected: int32 but got: T (declared in nimony/lib/std/system.nim(117, 1)) [1] expected: bool but got: T (declared in nimony/lib/std/system.nim(126, 1)) [1] T does not match constraint T (declared in nimony/lib/std/system.nim(129, 1)) [1] expected: string but got: T (declared in nimony/lib/std/system/stringimpl.nim(1054, 1)) [1] expected: float64 but got: T (declared in nimony/lib/std/system/formatfloat.nim(1587, 1)) [1] expected: float32 but got: T (declared in nimony/lib/std/system/formatfloat.nim(1592, 1)) [ 50%] teszpno6r1.s.nif nifmake: command failed (exit code 1): nimony/bin/nimsem --base:. --define:nimNativeAlloc --define:nimNativeIo m --isMain nimcache/teszpno6r1.p.nif FAILURE: nimony/bin/nifmake --base:. -j run --progress:0:50 nimcache/teszpno6r1.build.nif