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

fix: evaluator if order bug #1565

Merged
merged 1 commit into from
Aug 14, 2024
Merged

Conversation

Peefy
Copy link
Contributor

@Peefy Peefy commented Aug 14, 2024

1. Does this PR affect any open issues?(Y/N) and add issue references (e.g. "fix #123", "re #123".):

  • N
  • Y

re crossplane-contrib/function-kcl#125

fix #1566

  • fix: evaluator if order bug

The expected output of the following code is

_items = []
if False:
    _items += [ {key1 = "value1"} ]
if True:
    _items += [ {key2 = "value2"} ]
items = _items
items:
- key2: value2

Copy link
Contributor

@zong-zhe zong-zhe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@coveralls
Copy link
Collaborator

coveralls commented Aug 14, 2024

Pull Request Test Coverage Report for Build 10382735436

Warning: This coverage report may be inaccurate.

This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.

Details

  • 41 of 43 (95.35%) changed or added relevant lines in 5 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.01%) to 70.559%

Changes Missing Coverage Covered Lines Changed/Added Lines %
kclvm/evaluator/src/lazy.rs 33 35 94.29%
Totals Coverage Status
Change from base Build 10367263780: 0.01%
Covered Lines: 50513
Relevant Lines: 71590

💛 - Coveralls

@Peefy Peefy merged commit be4946e into kcl-lang:main Aug 14, 2024
12 checks passed
@Peefy Peefy deleted the fix-evalutor-if-order branch August 14, 2024 07:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug] Dup output for the if stmt.
3 participants