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: config list subscript type unsoundness #1591

Merged
merged 1 commit into from
Aug 22, 2024

Conversation

Peefy
Copy link
Contributor

@Peefy Peefy commented Aug 21, 2024

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

  • N
  • Y
  • fix: config list subscript type unsoundness

Before this PR, the following code will get an unexpected type error, which is because the a[0] += [1, 2, 3] has beed inferred with wrong types.

config: {str:[int]} = {
    a += [0, 1, 2]
    a[0] += [1, 2, 3]
}

@Peefy Peefy added bug Something isn't working resolver labels Aug 21, 2024
@Peefy Peefy added this to the v0.10.0 Release milestone Aug 21, 2024
@Peefy Peefy force-pushed the fix-list-attr-ty-unsoundness branch from c9f2c3f to 99bbea8 Compare August 21, 2024 17:01
@coveralls
Copy link
Collaborator

coveralls commented Aug 21, 2024

Pull Request Test Coverage Report for Build 10494194365

Details

  • 0 of 23 (0.0%) changed or added relevant lines in 2 files are covered.
  • 1 unchanged line in 1 file lost coverage.
  • Overall coverage decreased (-0.02%) to 70.914%

Changes Missing Coverage Covered Lines Changed/Added Lines %
kclvm/sema/src/resolver/config.rs 0 10 0.0%
kclvm/ast/src/ast.rs 0 13 0.0%
Files with Coverage Reduction New Missed Lines %
kclvm/sema/src/resolver/config.rs 1 81.8%
Totals Coverage Status
Change from base Build 10486567571: -0.02%
Covered Lines: 51504
Relevant Lines: 72629

💛 - Coveralls

Copy link
Contributor

@He1pa He1pa left a comment

Choose a reason for hiding this comment

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

LGTM

@Peefy Peefy merged commit 16ca833 into kcl-lang:main Aug 22, 2024
12 checks passed
@Peefy Peefy deleted the fix-list-attr-ty-unsoundness branch August 22, 2024 03:45
shruti2522 pushed a commit to shruti2522/kcl that referenced this pull request Aug 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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants