diff --git a/.gitattributes b/.gitattributes index df9e73f94c..e21699007e 100644 --- a/.gitattributes +++ b/.gitattributes @@ -16118,6 +16118,7 @@ tests/webtbf/tw36377.pp svneol=native#text/pascal tests/webtbf/tw36397.pp -text svneol=native#text/pascal tests/webtbf/tw3643.pp svneol=native#text/plain tests/webtbf/tw3644.pp svneol=native#text/plain +tests/webtbf/tw36554.pp svneol=native#text/pascal tests/webtbf/tw3662.pp svneol=native#text/plain tests/webtbf/tw3680.pp svneol=native#text/plain tests/webtbf/tw3716.pp svneol=native#text/plain diff --git a/compiler/pstatmnt.pas b/compiler/pstatmnt.pas index acc7c3d93a..e62d164f74 100644 --- a/compiler/pstatmnt.pas +++ b/compiler/pstatmnt.pas @@ -385,7 +385,10 @@ implementation ) and (hloopvar.resultdef.typ<>undefineddef) then - MessagePos(hloopvar.fileinfo,type_e_ordinal_expr_expected); + begin + MessagePos(hloopvar.fileinfo,type_e_ordinal_expr_expected); + hloopvar.resultdef:=generrordef; + end; hp:=hloopvar; while assigned(hp) and diff --git a/tests/webtbf/tw36554.pp b/tests/webtbf/tw36554.pp new file mode 100644 index 0000000000..3113f4186d --- /dev/null +++ b/tests/webtbf/tw36554.pp @@ -0,0 +1,15 @@ +{ %fail } +type oWord = record q1,q2 : qword; end; + +procedure megadoodoo; +var a : oWord; + +begin + for a:=0 to 3 do + begin + end; +end; + + +begin +end.