[nem-en] strange warning when compiling
Kamil Skalski
kamil.skalski at gmail.com
Tue Jan 10 08:28:25 CET 2006
%^^ is supposed to be used on enum types, because enums are not
implicitly converted to int, so to use ^ operator on them it is
necessary to cast :> them to ints. When you want to do ^ just for
ints, then no casts are necessary.
Compiler message is correct, though maybe a little bit misterious.
Also maybe in quick guide it should be stated that %XX operators are
used for enums.
2006/1/10, Philippe Quesnel <philippe.quesnel at gmail.com>:
> hi,
> was going through the Quick Guide & tried the (weird) %|| type of ops...
>
> code:
> def a = 1;
> def b = 2;
> mutable c = false;
> c = a %^^ b; // <== here
>
> warning:
> t.n:11:13:11:20: warning: N10001: there is no check needed to cast int to
> int
> t.n:11:13:11:20: hint: consider using : instead of :>
>
> is this a compiler bug ?
> thought you might want to know
>
>
> _______________________________________________
> https://nemerle.org/mailman/listinfo/devel-en
>
>
>
--
Kamil Skalski
http://nazgul.omega.pl
More information about the devel-en
mailing list