[nem-en] Some problems with typeof operator (when applied to a
tuple type)
Kamil Skalski
kamil.skalski at gmail.com
Wed Feb 14 19:30:05 CET 2007
Yes, it is a bug.
2007/2/14, Vladimir Reshetnikov <v.reshetnikov at gmail.com>:
> [nemerle]
> using System.Console;
>
> class A[T,S] { }
>
> WriteLine(typeof(A[_,_]).IsGenericTypeDefinition); // True
> WriteLine(typeof(A[_,_]).Equals(typeof(A[object,object]))); // False
>
> WriteLine(typeof(_ * _).IsGenericTypeDefinition); // False
> WriteLine(typeof(_ * _).Equals(typeof(object * object))); // True
> [/nemerle]
>
> Obviously, that (_ * _) is treated as closed constructed polymorphic
> type (object * object), not as unbounded polymorpic type (_ * _), that
> is Nemerle.Builtins.Tuple[_,_].
> IMO, this is an error.
>
> _______________________________________________
> https://nemerle.org/mailman/listinfo/devel-en
>
--
Kamil Skalski
http://nazgul.omega.pl
More information about the devel-en
mailing list