compiler bug with type inference
If we extend an object residing in another module, then there are problems finding a suitable constructor if the form VAR t := NEW T(...); is used for instantiation.
MODULE A;
TYPE
T* = OBJECT
PROCEDURE &InitA*(value: SIZE);
END InitA;
END T;
END A.
MODULE B;
IMPORT A;
TYPE
T* = OBJECT(A.T)
PROCEDURE &InitB*(CONST x: ARRAY OF CHAR);
END InitB;
END T;
VAR t1 := NEW T("Hello"); (*!incompatible parameter*)
VAR t2 := NEW T("World"): T; (*! OK *)
END B.