Typecasting in SAC considered bizarre
|
|
Bugzilla Link |
52 |
Created on |
Sep 08, 2004 16:57 |
Resolution |
FIXED |
Resolved on |
Nov 24, 2005 17:02 |
Version |
1.00beta |
OS |
Linux |
Architecture |
PC |
Attachments |
bugtypecast.sac |
Extended Description
I have a problem understanding the role of typecasts in SAC,
and specifically, the idea that all empty arrays are integer.
We know there are different types of empty arrays:
Existence proof:
- empty egg cartons
- vacant stares
- empty milk crates
I was unable to perform a type-case of an empty list:
print ((:char[0])a_e);
It produces this:
bugtypecast.sac:14:ERROR: element types of cast-type and expr-type should
:ERROR: be identical; types found: char[0] and
:ERROR: int[0]{[0]} !