[nem-bug] [Nemerle 0001048]: generic type constraints compatiblity

feedback at nemerle.org feedback at nemerle.org
Sat Sep 1 12:02:54 CEST 2007


The following issue has been SUBMITTED.
======================================================================
<http://nemerle.org/bugs/view.php?id=1048> 
======================================================================
Reported By:                BOleg
Assigned To:                
======================================================================
Project:                    Nemerle
Issue ID:                   1048
Category:                   Compiler
Reproducibility:            always
Severity:                   minor
Priority:                   normal
Status:                     new
======================================================================
Date Submitted:             09-01-2007 12:02 CEST
Last Modified:              09-01-2007 12:02 CEST
======================================================================
Summary:                    generic type constraints compatiblity
Description: 
See examples:

class RefTypeA {}
class RefTypeB {}

struct StructType {}

class Test1[T1]  where T1 : Object, Int32 {} //internal compiler error:
assertion ''Set.FromList (lst).Intersect (supers).IsEmpty'' failed in file
ncc\typing\MType.n, line 1020
class Test2[T1]  where T1 : Object, StructType {} //OK (bug, reference
type and struct type
class Test3[T1]  where T1 : RefTypeA, RefTypeB {} //OK (bug, incompatible
types)
class Test4[T1]  where T1 : class, StructType {} //OK (bug, reference type
constraint and struct type)

======================================================================

Issue History
Date Modified  Username       Field                    Change              
======================================================================
09-01-07 12:02 BOleg          New Issue                                    
09-01-07 12:02 BOleg          File Added: generics.zip                     
======================================================================




More information about the bugs mailing list