Skip to content

The generated C code contains errors #836

@bbodi

Description

@bbodi
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)

when isMainModule:
  import unittest

  test "":
    var opt: TOption[seq[string]]
    opt = some(@[]) # this line causes the generated C code to contain errors

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions