Skip to content

Eval errors on nested object #1979

@steeling

Description

@steeling

Bug Report

See the repro below

1. Minimal reproduce step (Required)

schema ParentObject:
    child: ChildObject = {} # If you remove the `= {}`, then this works.

schema ChildObject:
    labels: {str:str}
    check:
        len(labels) > 0



output = ParentObject{
    child: {
        labels = {"app": "myapp", "env": "prod"}
    }
}

2. What did you expect to see? (Required)

The above should succeed since labels have len > 0

3. What did you see instead (Required)

failed the check

4. What is your KCL components version? (Required)

kcl version
0.11.2-darwin-arm64

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions