[nem-bug] [Nemerle 0001032]: Strange interface implementation behavior

feedback at nemerle.org feedback at nemerle.org
Wed Jun 27 15:27:16 CEST 2007


The following issue has been SUBMITTED.
======================================================================
<http://nemerle.org/bugs/view.php?id=1032> 
======================================================================
Reported By:                msinger
Assigned To:                
======================================================================
Project:                    Nemerle
Issue ID:                   1032
Category:                   Compiler
Reproducibility:            always
Severity:                   minor
Priority:                   normal
Status:                     new
======================================================================
Date Submitted:             06-27-2007 15:27 CEST
Last Modified:              06-27-2007 15:27 CEST
======================================================================
Summary:                    Strange interface implementation behavior
Description: 
The following code compiles well:

using SC = System.Collections;
using SCG = System.Collections.Generic;
public class Moo : SC.IComparer, SCG.IComparer[Moo]
{
  public Compare(_ : Moo, _ : Moo) : int {0}
  private Compare(_ : object, _ : object) : int implements
SC.IComparer.Compare {0}
}

But if the order of the two methods is reversed, like this:

public class Moo : SC.IComparer, SCG.IComparer[Moo]
{
  private Compare(_ : object, _ : object) : int implements
SC.IComparer.Compare {0}
  public Compare(_ : Moo, _ : Moo) : int {0}
}

this error occurs:
"Method implementing interface member must be public and nonstatic"

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

Issue History
Date Modified  Username       Field                    Change              
======================================================================
06-27-07 15:27 msinger        New Issue                                    
======================================================================




More information about the bugs mailing list