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: the diagnostic of a lambda expression type error is incomplete #770

Closed
zong-zhe opened this issue Oct 16, 2023 · 0 comments · Fixed by #771
Closed

bug: the diagnostic of a lambda expression type error is incomplete #770

zong-zhe opened this issue Oct 16, 2023 · 0 comments · Fixed by #771
Assignees
Labels
bug Something isn't working

Comments

@zong-zhe
Copy link
Contributor

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

The kcl file content:

_func = lambda x: int, y: int -> int {
    x - y
}  # Ok
_func = lambda x: int, y: int -> str {
    str(x + y)
}  

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

  |
4 | _func = lambda x: int, y: int -> str {
  | ^ expected function (int, int) -> int, got function (int, int) -> str
  |

3. What did you see instead (Required)

  |
4 | _func = lambda x: int, y: int -> str {
  | ^ expected function, got function
  |

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

$ kcl --version
Version: 0.6.0-20ab3eb4b9179219d6837a57f5d35286
Platform: aarch64-apple-darwin
GitCommit: 54fba25efc10411faa5b8ba5f82e216047691772
@zong-zhe zong-zhe added the bug Something isn't working label Oct 16, 2023
@zong-zhe zong-zhe added this to the v0.7.0 Release milestone Oct 16, 2023
@zong-zhe zong-zhe self-assigned this Oct 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
No open projects
Status: v0.7.0 Release Done
Development

Successfully merging a pull request may close this issue.

1 participant