[nem-en] Re: [nem-feedback] Generic's "where" constraint
improvement.
Michal Moskal
michal.moskal at gmail.com
Thu Mar 9 13:33:10 CET 2006
On 3/9/06, Kamil Skalski <kamil.skalski at gmail.com> wrote:
> > [offtopic] I have one question about this code. This is for my education
> > :) Why I must cast _current and required to IConvertible interface? I
>
> This is a bug. If we have 'a : IFoo, then (x : 'a).Foo() and (x
> : IFoo).Foo() should be the same. Could you file a bug report for this
> in bugs.nemerle.org ?
Not quite. The following C# sample:
interface IFoo {
void Foo();
}
class A : IFoo
{
void IFoo.Foo () { }
}
class C {
public static void Main ()
{
A a = new A ();
a.Foo ();
}
}
gives:
foo.cs(14,2): error CS0117: `A' does not contain a definition for `Foo'
which is quite similar to what ncc reports now. So I guess the problem
here is a little bit different.
--
Michal Moskal,
http://nemerle.org/~malekith/
More information about the devel-en
mailing list