Skip to content

Generate higher order struct types #100

@raffopazzo

Description

@raffopazzo

The following program typechecks but the llvmgen stage terminates with the error `cannot emit program with higher order struct types. It should be possible to emit LLVM code by boxing fields with a dependent type.

func int_or_bool(bool_t which) -> typename
{
    if (which)
        return i32_t;
    else
        return bool_t;
}

struct t
{
    bool_t x;
    int_or_bool(x) y;
};

func f(t x) -> int_or_bool(x.x)
{
    return x.y;
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    featureNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions