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

forget_abbrev: do not assert when no abbrevs #1576

Merged
merged 3 commits into from Jan 23, 2018

Conversation

Projects
None yet
3 participants
@trefis
Copy link
Contributor

trefis commented Jan 19, 2018

The story behind MPR#7712 seems to be that at the very end of unify3 if create_recursion is true, then we always expect p to have some abbrevs.
But in this particular case we've called add_gadt_equation p t2' a few lines above, which calls cleanup_abbrev.

A simple fix seems to have forget_abbrev be happy to just do nothing when there are no abbrevs.
As this is the only place where forget_abbrev is called, this seems safe to do.

@gasche

This comment has been minimized.

Copy link
Member

gasche commented Jan 19, 2018

(cc @garrigue)

@garrigue
Copy link
Contributor

garrigue left a comment

I indeed agree that removing the assertion in forget_abbrev is not dangerous.
I had some qualms about the call to link_type, but this is an independent question. The only person who could really answer is Jerome...

@trefis trefis force-pushed the trefis:pr7712 branch from 8a88fac to a4b891c Jan 23, 2018

@trefis

This comment has been minimized.

Copy link
Contributor Author

trefis commented Jan 23, 2018

I rebased, added a test and updated the Changes file.
I'll merge once travis confirms everything is still OK.

@trefis trefis merged commit edc2eae into ocaml:trunk Jan 23, 2018

2 checks passed

continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.