[nem-bug] [Nemerle 0000710]: 'is' not allowed on generic parameters

feedback at nemerle.org feedback at nemerle.org
Fri Jul 28 22:15:10 CEST 2006


The following issue has been RESOLVED.
======================================================================
<http://nemerle.org/bugs/view.php?id=710> 
======================================================================
Reported By:                trupill
Assigned To:                nazgul
======================================================================
Project:                    Nemerle
Issue ID:                   710
Category:                   Compiler
Reproducibility:            always
Severity:                   major
Priority:                   normal
Status:                     resolved
Resolution:                 fixed
Fixed in Version:           
======================================================================
Date Submitted:             07-06-2006 23:48 CEST
Last Modified:              07-28-2006 22:15 CEST
======================================================================
Summary:                    'is' not allowed on generic parameters
Description: 
You cannot use the 'is' operator on generic parameters.

This code:

public class Example
{
    public Method [From, To] (x : From, f : From -> To) : To
    {
        match (x) {
        | t is To => t
        | _ => f (x)
        }
    }
}

Shows these compiler errors:

n.n:6:11:6:18: error: invalid type in (x : type) pattern: To.739
n.n:6:22:6:23: error: unbound name `t'
n.n:7:11:7:12: warning: this match clause is unused
======================================================================

----------------------------------------------------------------------
 nazgul - 07-24-06 00:17 
----------------------------------------------------------------------
Fixed on trunk (r6466).

----------------------------------------------------------------------
 nazgul - 07-25-06 23:57 
----------------------------------------------------------------------
The generated code does not verify
[IL]: Error: [C:\cygwin\home\nazgul\nemerle\ncc\testsuite\tymatch.exe :
M+TypesMatch::Method[From,To]][offset 0x0000001B][found (unboxed) 'From']
Expected an ObjRef on the stack.
1 Error Verifying tymatch.exe

so I reopen it for now.

----------------------------------------------------------------------
 nazgul - 07-28-06 22:15 
----------------------------------------------------------------------
Now it verifies.

Issue History
Date Modified  Username       Field                    Change              
======================================================================
07-06-06 23:48 trupill        New Issue                                    
07-24-06 00:17 nazgul         Status                   new => resolved     
07-24-06 00:17 nazgul         Resolution               open => fixed       
07-24-06 00:17 nazgul         Assigned To               => nazgul          
07-24-06 00:17 nazgul         Note Added: 0001375                          
07-24-06 00:17 nazgul         Summary                  'is' not allowed on
generic parameters => \'is\' not allowed on generic parameters
07-24-06 00:17 nazgul         Description Updated                          
07-25-06 23:57 nazgul         Note Added: 0001378                          
07-25-06 23:57 nazgul         Status                   resolved => assigned
07-25-06 23:57 nazgul         Summary                  'is' not allowed on
generic parameters => \'is\' not allowed on generic parameters
07-25-06 23:57 nazgul         Description Updated                          
07-28-06 22:15 nazgul         Status                   assigned => resolved
07-28-06 22:15 nazgul         Note Added: 0001382                          
======================================================================




More information about the bugs mailing list