[nem-bug] [Nemerle 0000638]: Co/contravariance for generic
interfaces / delegates
feedback at nemerle.org
feedback at nemerle.org
Sat Mar 25 19:55:33 CET 2006
The following issue has been SUBMITTED.
======================================================================
<https://nemerle.org/bugs/view.php?id=638>
======================================================================
Reported By: steffen
Assigned To:
======================================================================
Project: Nemerle
Issue ID: 638
Category: Compiler
Reproducibility: always
Severity: feature
Priority: normal
Status: new
======================================================================
Date Submitted: 03-25-2006 19:55 CET
Last Modified: 03-25-2006 19:55 CET
======================================================================
Summary: Co/contravariance for generic interfaces / delegates
Description:
It would be nice to have co/contravariance support for generic parameters
of interfaces and delegates.
I.e. you should be able to do something like this:
interface IEnumerator[[covariant] T] {
Current : T { get; }
MoveNext() : bool;
}
interface IComparer[[contravariant] T] {
Compare(x : T, y : T);
}
delegate EventHandler[[contravariant] T](arg : T) : void;
(The examples are from the CLI Spec II 9.5)
Btw.: It seems tha ncc doesn't support attribute for type parameter, e.g.
public class attr : System.Attribute { }
public interface X[[attr] 'a] { }
fails to compile.
======================================================================
Issue History
Date Modified Username Field Change
======================================================================
03-25-06 19:55 steffen New Issue
======================================================================
More information about the bugs
mailing list