C03) What does that Qua-check warning mean, anyway?
Description
This article is from the FAQ, by with numerous contributions by
others.
C03) What does that Qua-check warning mean, anyway?
If you have:
(# Vehicle: (# ... #);
Bus: Vehicle(# ... #);
aVehicle: ^Vehicle;
aBus: ^Bus
do ...
aVehicle[]->aBus[]
...
#)
the compiler will give a Qua-check warning at the "aVehicle[]->aBus[]". The
reason is that aBus can only refer to objects which are instances of a
pattern that is a subpattern of Bus (or is a Bus). But aVehicle may refer to
all objects which are instances of a pattern that is a subpattern of Vehicle
(or is a Vehicle) - that is, not necessarily Bus. The BETA runtime system
therefore inserts a test to verify that the object referenced by aVehicle[]
is actually an instance of a pattern that is a subpattern of Bus (or is a
Bus) - otherwise a runtime error occurs.
The Qua-warning is issued to direct your attention towards these places for
potential runtime errors.
 
Continue to: