Skip to content

Faulty code generation when using metadata with min/max operation #1178

@SimonCockx

Description

@SimonCockx

This sample fails with a compilation error:

func Test:
    inputs:
        foo Foo (1..*)
    output:
        result number (0..1)

    set result:
        foo -> bar
            max [ attr ]
            then extract value

type Foo:
    bar Bar (1..*)
        [metadata location]

type Bar:
    attr string (1..1)
    value number (1..1)

This one fails with a different error:

func Test:
    inputs:
        bar Bar (1..*)
            [metadata location]
    output:
        result Bar (0..1)

    set result:
        bar
            max [ attr ]

type Bar:
    attr string (1..1)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingsubject: code generationThis issue is about code generation

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions