Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

List of boolean not evaluated correctly #854

Open
hugohills-regnosys opened this issue Oct 7, 2024 · 0 comments
Open

List of boolean not evaluated correctly #854

hugohills-regnosys opened this issue Oct 7, 2024 · 0 comments
Labels
bug Something isn't working subject: model validation This issue is about validation of Rosetta models, such as the type system

Comments

@hugohills-regnosys
Copy link
Contributor

hugohills-regnosys commented Oct 7, 2024

type Foo:
    attr boolean (1..1)

func ShouldEvalulateToSingleCardinality:
    inputs:
        foos Foo (0..*)
    output:
        result boolean (0..1)

    set result:
        foos extract ExtractAttr // should cause validation error because this returns a list of booleans rather than a single

func ExtractAttr:
    inputs:
        foo Foo (1..1)
    output:
        extractedAttr boolean (1..1)

    set extractedAttr:
        foo -> attr

The above function ShouldEvalulateToSingleCardinality should cause a validation error because the list of booleans needs to reduced to a single boolean, for example by add then all = True.

@hugohills-regnosys hugohills-regnosys added subject: model validation This issue is about validation of Rosetta models, such as the type system bug Something isn't working labels Oct 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working subject: model validation This issue is about validation of Rosetta models, such as the type system
Projects
None yet
Development

No branches or pull requests

1 participant