[nem-en] Interface re-implementation
Kamil Skalski
kamil.skalski at gmail.com
Sun Feb 11 10:51:32 CET 2007
This is similar feature to http://nemerle.org/bugs/view.php?id=818
We currently do not support implementing interfaces twice.
2007/2/11, Vladimir Reshetnikov <v.reshetnikov at gmail.com>:
> Ncc "forgets" to re-implement interface if it is already implemented
> in a base class.
>
> [nemerle]
> using System;
> using System.Console;
> class A : IDisposable {
> public Dispose() : void {
> WriteLine("here")
> }
> }
>
> class B : A, IDisposable {
> new public Dispose() : void {
> WriteLine("there")
> }
> static Main() : void {
> using(b = B()) {}
> }
> }
> [/nemerle]
>
> Compare it with
>
> [c#]
> using System;
> class A : IDisposable {
> public void Dispose() {
> Console.WriteLine("here");
> }
> }
>
> class B : A, IDisposable {
> new public void Dispose() {
> Console.WriteLine("there");
> }
>
> static void Main() {
> using(B b = new B()){}
> }
> }
> [/c#]
>
> _______________________________________________
> https://nemerle.org/mailman/listinfo/devel-en
>
--
Kamil Skalski
http://nazgul.omega.pl
More information about the devel-en
mailing list