Now let's make things a bit more complicated. Would you be able to guess
the output of the following program?
---BEGIN aaa7.as
#include "aldor"
#include "aldorio"
define CatA: Category == with;
define CatX: Category == with;
A: Join(CatX, CatA) == add;
X: CatX == A add; stdout << (X has CatA) << newline;
Y: CatX == A; stdout << (Y has CatA) << newline;
#if WITHZ
Z: CatA == Y; stdout << (Z has CatA) << newline;
#endif
---END aaa7.as
Right.
>aldor -grun -laldor aaa7.as
F
T
>aldor -DWITHZ -grun -laldor aaa7.as
"aaa7.as", line 11: Z: CatA == Y; stdout << (Z has CatA) << newline;
...........^
[L11 C12] #1 (Error) There are 0 meanings for `Y' in this context.
The possible types were:
Y: CatX, a local
The context requires an expression of type CatA.
So the compiler now thinks that the type of Y is just CatX. OK, but then
why can the program print "T" in the previous compilation?