Potential issue when concatenating parts of string literals without an operator.
Now, when declaring a string literal, the parts enclosed in "" are concatenated without any warning. This creates the potential for subtle bugs. For example:
MODULE Test19;
CONST Str = "Hello"(*comments*)"World";
TYPE
StringList = OBJECT
OPERATOR "+"(CONST value: ARRAY OF CHAR): StringList;
BEGIN
TRACE("plus", value);
RETURN SELF;
END "+";
OPERATOR "-"(CONST value: ARRAY OF CHAR): StringList;
BEGIN
TRACE("minus", value);
RETURN SELF;
END "-";
END StringList;
PROCEDURE P*;
VAR list := NEW StringList();
BEGIN
list := list + "12" + "34" - "567" (*! , *) "890" "000"; (*!made a mistake and skipped the operator, but the compiler did not detect it*)
END P;
END Test19.P~