[nem-bug] [Nemerle 0000998]: Incomprehensible warning if use 'is' for matching variant option

feedback at nemerle.org feedback at nemerle.org
Tue May 1 16:56:01 CEST 2007


The following issue has been SUBMITTED.
======================================================================
<http://nemerle.org/bugs/view.php?id=998> 
======================================================================
Reported By:                VladD2
Assigned To:                
======================================================================
Project:                    Nemerle
Issue ID:                   998
Category:                   Code Completion Engine
Reproducibility:            always
Severity:                   minor
Priority:                   normal
Status:                     new
======================================================================
Date Submitted:             05-01-2007 16:56 CEST
Last Modified:              05-01-2007 16:56 CEST
======================================================================
Summary:                    Incomprehensible warning if use 'is' for matching
variant option
Description: 
using System.Console;

variant X
{
  | A
  | B { val : X; }
}

module Program
{
  Main() : void
  {
    def x = X.B(X.B(X.A()));
    match (x)
    {
      | X.B(_z is X.B) => WriteLine("B"); //W: using the ''is'' pattern
here is redundant, please use '':''
      | X.B(_z is X.A) => WriteLine("A");
      | _ => ()
    }
    
    _ = ReadLine();
  }
}

The compiler should say: "Use 'as' keyword instead." od don't produce
warning.
======================================================================

Issue History
Date Modified  Username       Field                    Change              
======================================================================
05-01-07 16:56 VladD2         New Issue                                    
======================================================================




More information about the bugs mailing list