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 compiler crash in sealedStrictDescendants #15919

Closed
wants to merge 1 commit into from

Conversation

Florian3k
Copy link
Contributor

Fixes #15908

@@ -1626,7 +1626,7 @@ object SymDenotations {
// is defined in the same scope as `cls` or in the companion object of `cls`.
completeChildrenIn(owner)
completeChildrenIn(companionClass)
setFlag(ChildrenQueried)
if isType then setFlag(ChildrenQueried)
Copy link
Member

Choose a reason for hiding this comment

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

I think it'd be better to skip the whole thing if the symbol is a type, otherwise it will recompute every time

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm not sure what you mean, could you elaborate?

Copy link
Member

Choose a reason for hiding this comment

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

So I've come across this again, the problem is calling children recursively in sealedStrictDescendants, and the isAllOf(JavaEnumTrait) will also return true for java enum cases, so best to check that it is also a class

@bishabosha
Copy link
Member

Maybe instead of conditionally setting the flag, could you try setting ChildrenQueried at its definition to be a term+type flag, and see what breaks

@ckipp01 ckipp01 assigned Florian3k and unassigned bishabosha Jun 7, 2023
@bishabosha
Copy link
Member

thanks for opening this originally! closing in favour of #19074

@bishabosha bishabosha closed this Nov 28, 2023
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.

Illegal flagset combination for Java Enums in sealedStrictDescendants
2 participants