I noticed that when declaring an array in the (discouraged but yet allowed)
C-style way, then Recoder does not report the type as an ArrayType. For
example:
int c = {1,2,3};
is not reported as an ArrayType, whereas the equivalent declaration
int c = {1,2,3};
is.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
what exactly do you ask for the type? If it is the TypeReference "int", then
it that's actually correct! "int" does not reference an ArrayType. The
LocalVariableDeclaration in the AST behaves the same. Example:
The VariableSpecification "c", however, should in both cases be reported as an
ArrayType.
Here is a very motivation example for this behavior:
int c, d;
Regards,
Tobias
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I noticed that when declaring an array in the (discouraged but yet allowed)
C-style way, then Recoder does not report the type as an ArrayType. For
example:
int c = {1,2,3};
is not reported as an ArrayType, whereas the equivalent declaration
int c = {1,2,3};
is.
Hej,
what exactly do you ask for the type? If it is the TypeReference "int", then
it that's actually correct! "int" does not reference an ArrayType. The
LocalVariableDeclaration in the AST behaves the same. Example:
The VariableSpecification "c", however, should in both cases be reported as an
ArrayType.
Here is a very motivation example for this behavior:
int c, d;
Regards,
Tobias