[nem-bug] [Nemerle 0000547]: generic constraint 'a : 'b and static instance problem

feedback at nemerle.org feedback at nemerle.org
Sun Feb 12 13:57:47 CET 2006


A NOTE has been added to this issue.
======================================================================
<http://nemerle.org/bugs/view.php?id=547> 
======================================================================
Reported By:                nazgul
Assigned To:                
======================================================================
Project:                    Nemerle
Issue ID:                   547
Category:                   Compiler
Reproducibility:            always
Severity:                   minor
Priority:                   normal
Status:                     confirmed
======================================================================
Date Submitted:             10-02-2005 20:05 CEST
Last Modified:              02-12-2006 13:57 CET
======================================================================
Summary:                    generic constraint 'a : 'b and static instance
problem
Description: 
This do not compile:

class A ['a, 'b] where 'a : 'b {
  public static x : A ['a, 'b] = A();
  
  public foo (x : 'a, y : 'b) : void { }
}

A.x.foo (1,1);


t.n:3:1:3:8: error: expected A['a.27, 'b.28], got A[System.Object+,
System.Object+] in assigned value: the types 'a.27 and 'b.28 are not
compatible [simple unify]


while this does:

class A ['a, 'b] {
  public static x : A ['a, 'b] = A();
  
  public foo (x : 'a, y : 'b) : void { }
}

A.x.foo (1,1);

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

----------------------------------------------------------------------
 nazgul - 02-12-06 13:57 
----------------------------------------------------------------------
Works on trunk. Testcase added (r6117)

Issue History
Date Modified  Username       Field                    Change              
======================================================================
10-02-05 20:05 nazgul         New Issue                                    
10-03-05 19:34 nazgul         Status                   new => confirmed    
02-12-06 13:57 nazgul         Note Added: 0001083                          
======================================================================




More information about the bugs mailing list