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

[Bug] Type Unsoundness for the schema index signature. #1006

Closed
Peefy opened this issue Jan 26, 2024 · 0 comments · Fixed by #1007
Closed

[Bug] Type Unsoundness for the schema index signature. #1006

Peefy opened this issue Jan 26, 2024 · 0 comments · Fixed by #1007
Labels
bug Something isn't working resolver runtime Issues or PRs related to kcl runtime including value and value opertions

Comments

@Peefy
Copy link
Contributor

Peefy commented Jan 26, 2024

For the following code, it is expected to get a evaluation error for the type attribute, because it is required.

schema Application:
    name: str
    components: WithComponents

schema WithComponent:
    name: str
    $type: str

schema WithComponents:
    [name: str]: WithComponent = {name: name}

myapp2: Application {
    name: "myapp2"
    components.ws: WithComponent {}
}

But, I've got the YAML output

Related discussion: https://github.com/orgs/kcl-lang/discussions/1005

@Peefy Peefy added bug Something isn't working runtime Issues or PRs related to kcl runtime including value and value opertions resolver labels Jan 26, 2024
@Peefy Peefy added this to the v0.8.0 Release milestone Jan 26, 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 resolver runtime Issues or PRs related to kcl runtime including value and value opertions
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant