[nem-en] usesite

Kamil Skalski kamil.skalski at gmail.com
Wed Feb 14 16:41:48 CET 2007


Use x.GetMemType().CanBeNull
Check it out in ncc/typing/MType.n

2007/2/14, Vladimir Reshetnikov <v.reshetnikov at gmail.com>:
> On 2/14/07, vc <vc at rsdn.ru> wrote:
> > > But this check for null makes sense only for reference types and
> > > nullable value types. For non-nullale value types it is redundant. How
> > > can I check in macro that target filed has a non-nullable value type?
> >
> > You can type expressions and use IsValueType of type.
> > Also you can use ?? operator instead:
> >  (someVar ?? someDefault).GetHashCode()
>
> I want to exclude that redundant check at compile-time, if possible.
> So, coalesce operator will not help me.
> What do you mean "type expression"? How to?
>
> _______________________________________________
> https://nemerle.org/mailman/listinfo/devel-en
>


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



More information about the devel-en mailing list