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

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


A NOTE has been added to this issue.
======================================================================
<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:38 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"

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

----------------------------------------------------------------------
 msinger - 06-27-07 15:38 
----------------------------------------------------------------------
I wonder why it is not possible to implement both methods with public
access in Nemerle. In C# and other languages this is allowed.

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




More information about the bugs mailing list