kcl-lang / kcl

KCL Programming Language (CNCF Sandbox Project). https://kcl-lang.io
https://kcl-lang.io
Apache License 2.0
1.41k stars 110 forks source link

fix: fix type infer in assignstmt #1411

Closed He1pa closed 2 weeks ago

He1pa commented 2 weeks ago

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

2. What is the scope of this PR (e.g. component or file name):

kclvm/sema/src/resolver/scope.rs

3. Provide a description of the PR(e.g. more details, effects, motivations or doc link):

rename set_type_to_scope -> set_infer_type_to_scope use annotation type as assign stmt target type if exist

4. Are there any breaking changes?(Y/N) and describe the breaking changes(e.g. more details, motivations or doc link):

5. Are there test cases for these changes?(Y/N) select and add more details, references or doc links:

coveralls commented 2 weeks ago

Pull Request Test Coverage Report for Build 9511654935

Details


Changes Missing Coverage Covered Lines Changed/Added Lines %
kclvm/sema/src/resolver/node.rs 1 2 50.0%
kclvm/sema/src/resolver/loop.rs 7 10 70.0%
kclvm/sema/src/resolver/scope.rs 12 18 66.67%
<!-- Total: 20 30 66.67% -->
Files with Coverage Reduction New Missed Lines %
kclvm/sema/src/ty/unify.rs 1 97.81%
<!-- Total: 1 -->
Totals Coverage Status
Change from base Build 9479636378: -0.003%
Covered Lines: 55081
Relevant Lines: 77462

💛 - Coveralls