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


_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Reply via email to