-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Check for symbol existence when working with GADT bounds in TypeComparer #6431
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
Conversation
Without the guard the test case crashes with an assert attempting get the owner of NoSymbol.
You can use |
I don't think that's going to help here ... the I could move the check into |
What do you think @AleksanderBG ? |
The previous CI failures were all timeouts, BTW. |
Urgh ... We need a style guide for this or something. FWIW there are a bunch of |
else { | ||
footprint += sym.typeRef | ||
super.gadtBounds(sym) | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IIUC that the problem is with NoSymbol.typeRef
exploding, I'd prefer
if (sym.exists) footprint += sym.typeRef
super.gadtBounds(sym)
instead, because 1) this matters for logging 2) it should ultimately be the business of GadtConstraint
to decide what to return for unconstrained symbols.
Otherwise LGTM.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That looks fine.
There's similar code in the neighbouring gadtAddLowerBound
and gadtAddUpperBound
... make the same change there as well?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've gone ahead and done that. Will merge when green.
Without the guard the test case crashes with an assert attempting get the owner of
NoSymbol
.