Mercury Bugs - mercury
View Issue Details
0000557mercuryBugpublic2022-04-11 01:082022-04-11 13:42
Assigned Tozs 
PlatformMacOSMacOSOS VersionCatalina
Product Version 
Target VersionFixed in Version 
Summary0000557: Ambiguous type causes compiler error without giving a useful error message for debugging
DescriptionMercury-Versions: 22.01 and rotd-2022-04-07

Two discriminated union types are defined in separate modules foo.m and bar.m and share the same name `ambiguous_type`. The module foo.m defines a record type of which one field has type `ambiguous_type`. A module qualification for the type of this record field is missing.

Actual result:
The compiler aborts with error and without giving a useful error message for debugging.

Expected result:
The compiler aborts with error, complaining about the missing module qualification for the ambiguous type.
Steps To ReproduceRun the attached test case (foo.m and bar.m)

mmc --make foo
TagsNo tags attached.
Attached Files? test-case.tar.xz (3,584) 2022-04-11 01:08

2022-04-11 13:42   
Fix committed 2022 apr 11.

Issue History
2022-04-11 01:08dirkzNew Issue
2022-04-11 01:08dirkzFile Added: test-case.tar.xz
2022-04-11 10:41zsAssigned To => zs
2022-04-11 10:41zsStatusnew => assigned
2022-04-11 13:42zsStatusassigned => resolved
2022-04-11 13:42zsResolutionopen => fixed
2022-04-11 13:42zsNote Added: 0001190