Type checking not order irrelevant although evaluation is #1725
Labels
bug
Something isn't working
enhancement
New feature or request
resolver
type-system
Issues or PRs related to kcl type system
Milestone
Bug Report
It seems that I am able to write statements at the top-level in any order.
However, when I make a mistake which causes a type error, I get different errors depending on the order I wrote the statements. In fact, I only get it at type checking if the statements are written in order.
(Not sure where this is specified in the docs but it feels similar in idea to what is described about schemas: Irrelevant Order Calculation).
1. Minimal reproduce step
Create
example.k
, with the given contents and runkcl run example.k
2. What did you expect to see?
3. What did you see instead
4. What is your KCL components version?
Why did you expect to see what you expected to see?
Glad you asked!
kcl run
on the following code gives the expected type errors. It's the same but withitems
constructed below_xs
instead of above.The text was updated successfully, but these errors were encountered: