01: package mlsub.typing.lowlevel;
02:
03: /**
04: * Thrown when the constraint implies that a and b have a common subtype or
05: * supertype, but a and b are rigid and this is not true
06: *
07: * @version $Revision: 1.1 $, $Date: 2000/06/14 13:32:51 $
08: * @author Alexandre Frey
09: **/
10: public class LowlevelIncompatibleClash extends LowlevelUnsatisfiable {
11: public final static int NO_COMMON_SUBTYPE = 1;
12: public final static int NO_COMMON_SUPERTYPE = 2;
13: private int what;
14: private int a;
15: private int b;
16: private int z;
17:
18: LowlevelIncompatibleClash(int what, int a, int b, int z) {
19: this .what = what;
20: this .a = a;
21: this .b = b;
22: this .z = z;
23: }
24:
25: public int getReason() {
26: return what;
27: }
28:
29: public int[] getRigidPair() {
30: return new int[] { a, b };
31: }
32:
33: public int getVar() {
34: return z;
35: }
36:
37: public String getMessage() {
38: return "Lowlevel incompatible clash: " + a + " and " + b
39: + " are not compatible";
40: }
41: }
|