[nem-bug] [Nemerle 0000768]: Explicit and implicit conversation problem with generic types.

feedback at nemerle.org feedback at nemerle.org
Wed Sep 27 19:39:18 CEST 2006


The following issue has been RESOLVED.
======================================================================
<http://nemerle.org/bugs/view.php?id=768> 
======================================================================
Reported By:                iae
Assigned To:                malekith
======================================================================
Project:                    Nemerle
Issue ID:                   768
Category:                   Compiler (type engine)
Reproducibility:            always
Severity:                   major
Priority:                   normal
Status:                     resolved
Resolution:                 fixed
Fixed in Version:           
======================================================================
Date Submitted:             09-27-2006 11:17 CEST
Last Modified:              09-27-2006 19:39 CEST
======================================================================
Summary:                    Explicit and implicit conversation problem with
generic types.
Description: 
Such code will compile with an error (see comments):

  class Y['t]
    mutable _t : 't
    public this(t : 't)
      _t = t
    public static @:> (y : Y['t]) : 't
      y._t
  
  def y = Y.[int](10)
  def x = y :> int // Y['t] can not be converted to 't

or 

  def p = (10 : int?) :> int; // 'Nullable[T]' can not be converted to
'T'

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

----------------------------------------------------------------------
 iae - 09-27-06 11:22 
----------------------------------------------------------------------
Of course, this bug should be in 'Compiler' category, not in a 'Code
Completion Engine'. Please change category, I not found how to make this.

----------------------------------------------------------------------
 malekith - 09-27-06 19:08 
----------------------------------------------------------------------
The problem is that the cast operator is not polymorphic (only the
surrounding class is) and we don't get the right type. I will try to fix
it.

----------------------------------------------------------------------
 malekith - 09-27-06 19:39 
----------------------------------------------------------------------
Resolved on trunk, r6728. Thanks!

Issue History
Date Modified  Username       Field                    Change              
======================================================================
09-27-06 11:17 iae            New Issue                                    
09-27-06 11:17 iae            File Added: typer__2006_09_27.patch               
    
09-27-06 11:22 iae            Note Added: 0001461                          
09-27-06 11:53 malekith       Category                 Code Completion Engine =>
Compiler (type engine)
09-27-06 11:53 malekith       Description Updated                          
09-27-06 11:53 malekith       Additional Information Updated                    
09-27-06 19:08 malekith       Note Added: 0001463                          
09-27-06 19:39 malekith       Status                   new => resolved     
09-27-06 19:39 malekith       Resolution               open => fixed       
09-27-06 19:39 malekith       Assigned To               => malekith        
09-27-06 19:39 malekith       Note Added: 0001464                          
======================================================================




More information about the bugs mailing list