Skip to content
Success

Changes

Summary

  1. typechecker: fix an internal error due to wrong exception (commit: fa858d9) (details)
Commit fa858d9d631782d95d7d5a9c5abe595e8ea506a6 by Florian Angeletti
typechecker: fix an internal error due to wrong exception

`Ctype.mcomp` was raising an errortrace when two types were incompatible
in two rare cases, whereas the function was specified to raise the
`Incompatible` exception. This was fine for internal uses of `mcomp`
within `Ctype`, because call to `mcomp` went through `mcomp_for` that
transformed the `Incompatible` exception into an errortrace. However,
this leads to internal errors for others use of `Ctype.mcomp` that were
only expecting an `Incompatible` exception and not an errortrace.

This simple fix replaces the two raises of errortrace by a raise of
`Incompatible`.
(commit: fa858d9)
The file was modifiedtestsuite/tests/typing-gadts/pr10189.ml (diff)
The file was modifiedtyping/ctype.ml (diff)
The file was modifiedChanges (diff)