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 crash with annotation on enum #1097

Merged
merged 1 commit into from
Dec 17, 2024
Merged

Fix crash with annotation on enum #1097

merged 1 commit into from
Dec 17, 2024

Conversation

msridhar
Copy link
Collaborator

Fixes #1093

We just missed a case.

@msridhar msridhar enabled auto-merge (squash) December 17, 2024 04:26
Copy link

codecov bot commented Dec 17, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 88.11%. Comparing base (cb3ff51) to head (3c420c2).
Report is 1 commits behind head on master.

Additional details and impacted files
@@             Coverage Diff              @@
##             master    #1097      +/-   ##
============================================
+ Coverage     88.09%   88.11%   +0.01%     
- Complexity     2204     2205       +1     
============================================
  Files            84       84              
  Lines          7175     7175              
  Branches       1423     1423              
============================================
+ Hits           6321     6322       +1     
+ Misses          431      430       -1     
  Partials        423      423              

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

@@ -367,8 +367,10 @@ private static boolean targetTypeMatches(Symbol sym, TypeAnnotationPosition posi
return false;
}
case CLASS:
// There are no type annotations on the top-level type of the class being declared, only
// on other types in the signature (e.g. `class Foo extends Bar<@A Baz> {}`).
// treated like a class
Copy link
Collaborator

Choose a reason for hiding this comment

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

Consider moving the comment on the same line as case ENUM and/or changing the comment to enums are treated like a class. It's slightly confusing right now because it appears in the block after case CLASS (though after some staring I understand it's meant to be a comment for the case ENUM.

@msridhar msridhar merged commit 346b9b0 into master Dec 17, 2024
11 checks passed
@msridhar msridhar deleted the issue-1093 branch December 17, 2024 05:04
@msridhar msridhar mentioned this pull request Dec 17, 2024
msridhar added a commit that referenced this pull request Dec 17, 2024
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.

Unhandled exception: unsupported element kind ENUM
2 participants