[nem-bug] [Nemerle 0001031]: Wrong match counterexamples

feedback at nemerle.org feedback at nemerle.org
Sat Jun 23 17:32:33 CEST 2007


The following issue has been SUBMITTED.
======================================================================
<http://nemerle.org/bugs/view.php?id=1031> 
======================================================================
Reported By:                divan
Assigned To:                
======================================================================
Project:                    Nemerle
Issue ID:                   1031
Category:                   Compiler (match compiler)
Reproducibility:            always
Severity:                   minor
Priority:                   normal
Status:                     new
======================================================================
Date Submitted:             06-23-2007 17:32 CEST
Last Modified:              06-23-2007 17:32 CEST
======================================================================
Summary:                    Wrong match counterexamples
Description: 
_ = x => match (x) {
  | (a, []) => a + 1
  | (a, [x]) => a + x + 1
}
w1.n:1:10:5:2: warning: matching is not exhaustive, example
unmatched value: (Nemerle.Core.list.Cons, tl = (Cons))
- Should be a tuple.

_ = x => match (x) {
  | (a, []) => a + 1
  | (a, [x]) => a + x + 1
  | (1, _) => 2
}
w2.n:1:10:5:2: warning: matching is not exhaustive, example
unmatched value: (Nemerle.Core.list.Cons, tl = (Cons), (anything except
[1]))
- Wrong order.
- Need better list representation, at least braces around it.
- [1] looks ambiguous: it can be a list or list of exceptions.
======================================================================

Issue History
Date Modified  Username       Field                    Change              
======================================================================
06-23-07 17:32 divan          New Issue                                    
======================================================================




More information about the bugs mailing list