[nem-bug] [Nemerle 0000996]: lack of checks when "implements" is used

feedback at nemerle.org feedback at nemerle.org
Mon Apr 30 11:45:45 CEST 2007


A NOTE has been added to this issue.
======================================================================
<http://nemerle.org/bugs/view.php?id=996> 
======================================================================
Reported By:                divan
Assigned To:                
======================================================================
Project:                    Nemerle
Issue ID:                   996
Category:                   Compiler
Reproducibility:            always
Severity:                   major
Priority:                   normal
Status:                     new
======================================================================
Date Submitted:             04-30-2007 11:39 CEST
Last Modified:              04-30-2007 11:45 CEST
======================================================================
Summary:                    lack of checks when "implements" is used
Description: 
interface IDo {
  Do() : void;
}

class A : IDo {
  public //it's ok to be public
  //private //compiles, but shouldn't?
  //internal //compiles, fails PEVerify check
  Do() : void implements IDo.Do {
  }
}

Should be E: "method implementing interface member must be public and
nonstatic", for private and internal case.
======================================================================

----------------------------------------------------------------------
 nazgul - 04-30-07 11:43 
----------------------------------------------------------------------
The purpose of implements is to implement interfaces using private (limited
methods). The only case where it is invalid is static methods.

If internal fails to verify, then it is either bug/limitation of MS
verifier and we should maybe somehow workaround the problem.

----------------------------------------------------------------------
 malekith - 04-30-07 11:45 
----------------------------------------------------------------------
I suspect this is because the method is also called Do. Could you try to
rename it?

Issue History
Date Modified  Username       Field                    Change              
======================================================================
04-30-07 11:39 divan          New Issue                                    
04-30-07 11:43 nazgul         Note Added: 0001857                          
04-30-07 11:45 malekith       Note Added: 0001858                          
======================================================================




More information about the bugs mailing list