@@ -10974,6 +10974,7 @@ tests/webtbf/tw1842.pp svneol=native#text/plain
tests/webtbf/tw1858.pp svneol=native#text/plain
tests/webtbf/tw18620.pp svneol=native#text/pascal
tests/webtbf/tw1905.pp svneol=native#text/plain
+tests/webtbf/tw19213.pp svneol=native#text/plain
tests/webtbf/tw1927.pp svneol=native#text/plain
tests/webtbf/tw1928.pp svneol=native#text/plain
tests/webtbf/tw1939.pp svneol=native#text/plain
@@ -1467,7 +1467,10 @@ implementation
break;
end;
if not found then
- Message1(parser_e_at_least_one_argument_must_be_of_type,pd.struct.RttiName);
+ if assigned(pd.struct) then
+ Message1(parser_e_at_least_one_argument_must_be_of_type,pd.struct.RttiName)
+ else
+ MessagePos(pd.fileinfo,type_e_type_id_expected);
if (optoken in [_EQ,_NE,_GT,_LT,_GTE,_LTE,_OP_IN]) and
((pd.returndef.typ<>orddef) or
@@ -0,0 +1,16 @@
+{ %fail }
+
+unit tw19213;
+{$mode objfpc}
+interface
+implementation
+class operator + (a, b: String): Integer;
+begin
+ Result := Length(a) + Length(b);
+end;
+end.