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

[Master] Fix Invalid type inferring for literal expression #38029

Merged
merged 20 commits into from
Aug 18, 2023

Conversation

SasinduDilshara
Copy link
Contributor

@SasinduDilshara SasinduDilshara commented Oct 3, 2022

Purpose

Fix Invalid type inferring for literal expression.

Fixes #37750
Fixes #38270
Fixes #38498
Fixes #38499

Check List

  • Read the Contributing Guide
  • Updated Change Log
  • Checked Tooling Support (#)
  • Added necessary tests
    • Unit Tests
    • Spec Conformance Tests
    • Integration Tests
    • Ballerina By Example Tests
  • Increased Test Coverage
  • Added necessary documentation
    • API documentation
    • Module documentation in Module.md files
    • Ballerina By Examples

Copy link
Member

@MaryamZi MaryamZi left a comment

Choose a reason for hiding this comment

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

I don't think the fix is correct. Please check the comments on the test changes.

@SasinduDilshara
Copy link
Contributor Author

I don't think the fix is correct. Please check the comments on the test changes.

will check. Thanks.

@KavinduZoysa
Copy link
Contributor

I think you can pass the compatibleType into this function

return getFiniteTypeMatchWithIntLiteral(literalExpr, finiteType, literalValue, data);
and we can return compatibleType at this point

@SasinduDilshara
Copy link
Contributor Author

I don't think the fix is correct. Please check the comments on the test changes.

Updated the PR. Please check.

@SasinduDilshara SasinduDilshara changed the title Fix Invalid type inferring for literal expression [Master] Fix Invalid type inferring for literal expression Oct 19, 2022
@codecov
Copy link

codecov bot commented Nov 1, 2022

Codecov Report

Patch coverage: 91.74% and no project coverage change.

Comparison is base (e87e53d) 76.35% compared to head (e57a4ab) 76.35%.
Report is 33 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##             master   #38029    +/-   ##
==========================================
  Coverage     76.35%   76.35%            
- Complexity    52258    52301    +43     
==========================================
  Files          2865     2866     +1     
  Lines        197494   197635   +141     
  Branches      25656    25687    +31     
==========================================
+ Hits         150791   150913   +122     
- Misses        38398    38413    +15     
- Partials       8305     8309     +4     
Files Changed Coverage Δ
.../compiler/semantics/analyzer/DataflowAnalyzer.java 89.87% <50.00%> (-0.08%) ⬇️
...alang/compiler/semantics/analyzer/TypeChecker.java 92.16% <82.60%> (-0.04%) ⬇️
...nalang/formatter/core/ImportFormattingOptions.java 85.00% <85.00%> (ø)
.../compiler/semantics/analyzer/QueryTypeChecker.java 88.74% <94.17%> (+0.69%) ⬆️
...g/ballerinalang/formatter/core/FormatterUtils.java 92.59% <100.00%> (+2.59%) ⬆️
...allerinalang/formatter/core/FormattingOptions.java 50.81% <100.00%> (+4.39%) ⬆️
...inalang/formatter/core/FormattingTreeModifier.java 96.10% <100.00%> (+0.13%) ⬆️

... and 6 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@github-actions
Copy link

This PR has been open for more than 15 days with no activity. This will be closed in 3 days unless the stale label is removed or commented.

@github-actions github-actions bot added the Stale label Dec 20, 2022
@github-actions
Copy link

Closed PR due to inactivity for more than 18 days.

@github-actions github-actions bot closed this Dec 24, 2022
@pcnfernando
Copy link
Member

@SasinduDilshara can you bring this to buldable state

@github-actions
Copy link

github-actions bot commented Aug 7, 2023

This PR has been open for more than 15 days with no activity. This will be closed in 3 days unless the stale label is removed or commented.

@github-actions github-actions bot added the Stale label Aug 7, 2023
@SasinduDilshara SasinduDilshara added Team/CompilerFE All issues related to Language implementation and Compiler, this exclude run times. and removed Stale labels Aug 8, 2023
@pcnfernando pcnfernando dismissed MaryamZi’s stale review August 18, 2023 06:51

To go ahead with the merge

@pcnfernando pcnfernando merged commit c86770c into ballerina-platform:master Aug 18, 2023
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Team/CompilerFE All issues related to Language implementation and Compiler, this exclude run times.
Projects
No open projects
Status: Addressing Review Suggestions
6 participants