[nem-en] casts

Kamil Skalski kamil.skalski at gmail.com
Sat Dec 16 21:24:18 CET 2006


Did you check the behavior or C# compiler when consuming classes with
such operator defined?

2006/12/16, Ivan Lakhturov <lakhturov at gmail.com>:
> Hello devel-en,
>
>   ok, casts are working as casts (for outside) now
>
>   and i checked some things...
>
>   so, let's proceed with the next simple question
>
>
>
>   public class A {}
>   public class B : A
>   {
>     public static @:>(_ : A) : B
>     {
>       B()
>     }
>   }
>
>
>
>       def a = A();
>       def b : B = a :> B;
>
>   should it be allowed or not? how d'you think, guys?
>   (c# prohibits overloading upcasts in B)
>
> regards, phantom
>
>
> _______________________________________________
> https://nemerle.org/mailman/listinfo/devel-en
>


-- 
Kamil Skalski
http://nazgul.omega.pl



More information about the devel-en mailing list