[m-rev.] for post-commit review: fix a rare problem with subtype checks

Zoltan Somogyi zoltan.somogyi at runbox.com
Sun Aug 9 10:31:02 AEST 2026


For review by Peter. The diff is with -b.

There is no test case yet, but after my next commit to it, the whole
compiler directory will serve as one. I found the problem while
working on that diff. Without this fix, dozens of files couldn't be
compiled due to failed subtype checks on subtype definitions
in .int2 files. The problem is simply that

- if a .int file contains a subtype definition, then we pull in the .int2
  files that define the type_ctors that occur in the types of its right
  hand side,

- but if a .int2 file contains a subtype definition, then we do nothing
  of the kind.

All the failures were due to the definitions of those type_ctors
simply not being available.

Zoltan.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Log.sti2
Type: application/octet-stream
Size: 482 bytes
Desc: not available
URL: <http://lists.mercurylang.org/archives/reviews/attachments/20260809/6aceb425/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: DIFF.sti2
Type: application/octet-stream
Size: 5751 bytes
Desc: not available
URL: <http://lists.mercurylang.org/archives/reviews/attachments/20260809/6aceb425/attachment-0001.obj>


More information about the reviews mailing list