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

feedback at nemerle.org feedback at nemerle.org
Mon May 22 18:06:17 CEST 2006


The following issue has been CLOSED
======================================================================
<http://nemerle.org/bugs/view.php?id=547> 
======================================================================
Reported By:                nazgul
Assigned To:                nazgul
======================================================================
Project:                    Nemerle
Issue ID:                   547
Category:                   Compiler
Reproducibility:            always
Severity:                   minor
Priority:                   normal
Status:                     closed
Resolution:                 fixed
Fixed in Version:           
======================================================================
Date Submitted:             10-02-2005 20:05 CEST
Last Modified:              05-22-2006 18:06 CEST
======================================================================
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)

----------------------------------------------------------------------
 nazgul - 02-12-06 13:58 
----------------------------------------------------------------------
So fixed.

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                          
02-12-06 13:58 nazgul         Status                   confirmed => resolved
02-12-06 13:58 nazgul         Resolution               open => fixed       
02-12-06 13:58 nazgul         Assigned To               => nazgul          
02-12-06 13:58 nazgul         Note Added: 0001084                          
02-12-06 13:58 nazgul         Summary                  generic constraint 'a :
'b and static instance problem => generic constraint \'a : \'b and static
instance problem
02-12-06 13:58 nazgul         Description Updated                          
05-22-06 18:06 nazgul         Status                   resolved => closed  
======================================================================




More information about the bugs mailing list