[nem-en] Pointer types in typeof expression

Kamil Skalski kamil.skalski at gmail.com
Wed Feb 14 19:26:26 CET 2007


The problem is that the new type would need to be integrated in all
the places of compiler.
As a start we would need to have new MType option for pointers and
handle it everywhere.

Can't you use:
typeof (void).MakePointerType()
?

I'm not sure if this is valid operation for all types, but maybe you
could check it at compile-time by yourself?

2007/2/14, Vladimir Reshetnikov <v.reshetnikov at gmail.com>:
> I need a feature:
> def ptr = typeof(void*); /* The same as
> System.Type.GetType("System.Void*"), but with compile-time check, that
> the target type exists */
>
> It does not require to allow unsafe code in Nemerle, and will be used
> only for reflection purposes.
>
> _______________________________________________
> https://nemerle.org/mailman/listinfo/devel-en
>


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



More information about the devel-en mailing list