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 compile error with single explicit assert in switch expression branch (#1845) #2033

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Vampire
Copy link
Member

@Vampire Vampire commented Oct 29, 2024

Fixes #1845

Copy link

codecov bot commented Oct 29, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 81.87%. Comparing base (2c7db77) to head (80f423c).
Report is 156 commits behind head on master.

Additional details and impacted files
@@             Coverage Diff              @@
##             master    #2033      +/-   ##
============================================
+ Coverage     80.44%   81.87%   +1.42%     
- Complexity     4337     4613     +276     
============================================
  Files           441      448       +7     
  Lines         13534    14450     +916     
  Branches       1707     1830     +123     
============================================
+ Hits          10888    11831     +943     
+ Misses         2008     1942      -66     
- Partials        638      677      +39     

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

@Vampire Vampire force-pushed the issue-1845 branch 7 times, most recently from 14a8e21 to f07a139 Compare November 5, 2024 13:24
if (!(code instanceof BlockStatement)) {
BlockStatement block = new BlockStatement();
block.addStatement(code);
expr.setCode(block);
Copy link
Member

Choose a reason for hiding this comment

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

Strange that the code block is marked as not covered, is there a test case missing?

Copy link
Member Author

Choose a reason for hiding this comment

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

Hm, strange, shouldn't. That test below should exactly trigger this two times.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Assertions in Switch Expressions lead to compiler error
2 participants