Warnnings when ast-type contains more than 32 elements
ssrmm opened this issue · 0 comments
ssrmm commented
The following code produces three compiler warnings:
namespace Test.Ast
{
ast Foo
{
in Bar01 : Bar;
in Bar02 : Bar;
in Bar03 : Bar;
in Bar04 : Bar;
in Bar05 : Bar;
in Bar06 : Bar;
in Bar07 : Bar;
in Bar08 : Bar;
in Bar09 : Bar;
in Bar10 : Bar;
in Bar11 : Bar;
in Bar12 : Bar;
in Bar13 : Bar;
in Bar14 : Bar;
in Bar15 : Bar;
in Bar16 : Bar;
in Bar17 : Bar;
in Bar18 : Bar;
in Bar19 : Bar;
in Bar20 : Bar;
in Bar21 : Bar;
in Bar22 : Bar;
in Bar23 : Bar;
in Bar24 : Bar;
in Bar25 : Bar;
in Bar26 : Bar;
in Bar27 : Bar;
in Bar28 : Bar;
in Bar29 : Bar;
in Bar30 : Bar;
in Bar31 : Bar;
in Bar32 : Bar;
in Bar33 : Bar;
}
ast Bar {}
}
D:\<..>\Ast.nitra(1,1): warning : N10011: comparing values of types int and uint with reference equality
D:\<..>\Ast.nitra(6,7): warning : N10011: comparing values of types int and uint with reference equality
D:\<..>\Ast.nitra(6,7): warning : N10011: comparing values of types int and uint with reference equality
If at least one of the properties is commented out, the file compiles without warnings.
Since there are no comparisons happening in the code, this looks like a Nitra bug.
For the sake of simplicity I've only used properties in this example. I can't exactly say to which elements count towards the limit, but there are others too. The actual case where I encountered this had calls to some extensions methods (written in Nemerle), which counted as well.