Mercury Bugs - mercury
View Issue Details
0000578mercuryBugpublic2025-11-20 17:162025-11-20 20:06
Reporterwangp 
Assigned Tozs 
PrioritynormalSeverityminorReproducibilityalways
StatusassignedResolutionopen 
PlatformOSOS Version
Product Version 
Target VersionFixed in Version 
Summary0000578: Switch detection regression
DescriptionAfter commit c9e549996 ("Let switch detection handle deeper disjunctions."), the compiler no longer accepts the given test case.

% mmc -e switch_detection_regression.m
switch_detection_regression.m:017: Error: the determinism declaration for
switch_detection_regression.m:017: predicate `halign'/5 is not satisfied.
switch_detection_regression.m:017: Declared `det', inferred `nondet'.
switch_detection_regression.m:017: The reasons for the difference are the
switch_detection_regression.m:017: following.
switch_detection_regression.m:029:
switch_detection_regression.m:029: Unification of `Dir' and
switch_detection_regression.m:029: `switch_detection_regression.ltr' can
switch_detection_regression.m:029: fail.
switch_detection_regression.m:031:
switch_detection_regression.m:031: Unification of `Dir' and
switch_detection_regression.m:031: `switch_detection_regression.rtl' can
switch_detection_regression.m:031: fail.
switch_detection_regression.m:032:
switch_detection_regression.m:032: Inside the case end/0 of the switch on
switch_detection_regression.m:032: TextAlign:
switch_detection_regression.m:032: disjunction has more than one disjunct
switch_detection_regression.m:032: with solutions.
switch_detection_regression.m:041:
switch_detection_regression.m:041: This later disjunct may have a solution.
switch_detection_regression.m:032:
switch_detection_regression.m:032: Inside the case start/0 of the switch on
switch_detection_regression.m:032: TextAlign:
switch_detection_regression.m:032: disjunction has more than one disjunct
switch_detection_regression.m:032: with solutions.
switch_detection_regression.m:041:
switch_detection_regression.m:041: This later disjunct may have a solution.
switch_detection_regression.m:038:
switch_detection_regression.m:038: Unification of `Dir' and
switch_detection_regression.m:038: `switch_detection_regression.ltr' can
switch_detection_regression.m:038: fail.
switch_detection_regression.m:040:
switch_detection_regression.m:040: Unification of `Dir' and
switch_detection_regression.m:040: `switch_detection_regression.rtl' can
switch_detection_regression.m:040: fail.
TagsNo tags attached.
Attached Files? switch_detection_regression.m (961) 2025-11-20 17:16
https://bugs.mercurylang.org/file_download.php?file_id=333&type=bug

There are no notes attached to this issue.

Issue History
2025-11-20 17:16wangpNew Issue
2025-11-20 17:16wangpFile Added: switch_detection_regression.m
2025-11-20 20:06zsAssigned To => zs
2025-11-20 20:06zsStatusnew => assigned