Skip to content

problem when matching parameter types in the ":=" operator

This code compiles although it contains a parameter type matching error:

MODULE Test;

TYPE
	R = RECORD END;

	OPERATOR ":="(VAR l: R; r: BOOLEAN);
	BEGIN
		l := r; (*!*)
	END ":=";
	
	OPERATOR ":="(VAR l: R; r: INTEGER);
	BEGIN
		l := r; (*!*)
	END ":=";

END Test.