01: /**************************************************************************/
02: /* B O S S A */
03: /* A simple imperative object-oriented research language */
04: /* (c) Daniel Bonniot 1999 */
05: /* */
06: /* This program is free software; you can redistribute it and/or modify */
07: /* it under the terms of the GNU General Public License as published by */
08: /* the Free Software Foundation; either version 2 of the License, or */
09: /* (at your option) any later version. */
10: /* */
11: /**************************************************************************/package mlsub.typing;
12:
13: /**
14: * Reports that two types that have to be compared
15: * do not have the same kind
16: *
17: * @author bonniot
18: */
19:
20: public class KindingEx extends TypingEx {
21: KindingEx(Polytype t1, Polytype t2) {
22: super (t1 + " and " + t2 + " do not have the same kind : "
23: + t1.getClass() + " and " + t2.getClass());
24: }
25:
26: KindingEx(Monotype t1, Monotype t2) {
27: super (t1 + " and " + t2 + " do not have the same kind : "
28: + t1.getClass() + " and " + t2.getClass());
29: }
30:
31: KindingEx(TypeConstructor t1, TypeConstructor t2) {
32: super (t1 + " and " + t2 + " do not have the same kind : "
33: + t1.getKind() + " and " + t2.getKind());
34: this .t1 = t1;
35: this .t2 = t2;
36: }
37:
38: KindingEx(TypeConstructor t, Interface i) {
39: super (t + " cannot implement " + i);
40: this .t1 = t;
41: this .t2 = i;
42: }
43:
44: KindingEx(Interface t1, Interface t2) {
45: super (t1 + " cannot extend " + t2);
46: this .t1 = t1;
47: this .t2 = t2;
48: }
49:
50: public Object t1, t2;
51: }
|