This commit is contained in:
Araq 2014-11-19 23:40:26 +01:00
commit abb2c21047
2 changed files with 20 additions and 0 deletions

View file

@ -0,0 +1,17 @@
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