mirror of
https://github.com/nim-lang/Nim.git
synced 2025-12-29 09:24:36 +00:00
18 lines
281 B
Nim
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
|
|
|