Files
Nim/tests/generics/tcannot_pass_empty_seq_to_generic.nim
2018-02-10 20:55:22 +01:00

18 lines
281 B
Nim

discard """
errormsg: "type mismatch: got <seq[empty]>"
line: 16
"""
# bug #836
type
TOption*[T] = object
case FIsSome: bool
of false: nil
of true: FData: T
proc some*[T](value: T): TOption[T] = TOption[T](FIsSome: true, FData: value)
echo some(@[]).FIsSome