[fpc-pascal] Type check for compile time expressions added
Olle Raab
olle.r at automagika.se
Mon Aug 22 21:19:34 CEST 2005
Type checking of compile time expression has been added to Free Pascal
Compile time expression are used in $IF/$IFC, and under mode MacPas, in
$SETC
This should hopefully help everyone to find some errors, but if it makes
trouble for anyone please let me know.
-------
Implementation details:
Each subexpression returns its type to the caller, which then can
do type check. Since data types of compile time expressions is
not well defined, the type system does a best effort. The drawback is
that some errors might not be detected.
Instead of returning a particular data type, a set of possible data types
are returned. This way ambigouos types can be handled. For instance a
value of 1 can be both a boolean and and integer.
Svn revision 919
Olle Raab
More information about the fpc-pascal
mailing list