[nem-pl] Re: [svn] nemerle/trunk/ncc: cgexpr.n cgil.n testsuite/ok-cgil.n tyexpr.n

Michal Moskal malekith at pld-linux.org
Sat Jan 3 01:06:56 CET 2004


On Sat, Jan 03, 2004 at 12:44:25AM +0100, olszta wrote:
> --- nemerle/trunk/ncc/cgexpr.n	(original)
> +++ nemerle/trunk/ncc/cgexpr.n	Sat Jan  3 00:44:22 2004
> @@ -1050,7 +1050,7 @@
>              match (m.tydecl) {
>                | TD_variant_option (encoded_type) =>
>                  def cm = make_cm (m, CK_variant_option (encoded_type));
> -                cm.inheritance <- [cg_type (ti.GetMemType ())];
> +                cm.inheritance <- [cg_type (ti.GetMemType ())]; // FIXME: variant options inheriting from themselves?
>                  cm.decls <- cg_list_decl (ti, members_of (m));
>                  cm

Nie od siebie, tylko od typu w którym są zdefiniowane. Tzn. np list.Cons po
list.

Swoją drogą to jest trochę popsute, myślę, że powinniśmy robić (w C#):

class list { ... }
class Cons : list { ... }
class Nil : list { ... }

Wtedy nazwy się zgadzają (w tej chwili udajemy, że list.Cons to list.Cons
oraz Cons).

-- 
: Michal Moskal :: http://www.kernel.pl/~malekith : GCS {C,UL}++++$ a? !tv
: When in doubt, use brute force. -- Ken Thompson : {E-,w}-- {b++,e}>+++ h




More information about the devel-pl mailing list