diff --git a/.gitattributes b/.gitattributes index e85a7e39ac..4f8f28f3db 100644 --- a/.gitattributes +++ b/.gitattributes @@ -6655,6 +6655,7 @@ tests/webtbs/tw4537.pp svneol=native#text/plain tests/webtbs/tw4540.pp -text svneol=unset#text/plain tests/webtbs/tw4557.pp svneol=native#text/plain tests/webtbs/tw4566.pp -text svneol=unset#text/plain +tests/webtbs/tw4574.pp svneol=native#text/plain tests/webtbs/tw4599.pp svneol=native#text/plain tests/webtbs/tw4613.pp -text svneol=unset#text/plain tests/webtbs/tw4616.pp svneol=native#text/plain diff --git a/compiler/pdecvar.pas b/compiler/pdecvar.pas index 7c5cca25ee..f62219d233 100644 --- a/compiler/pdecvar.pas +++ b/compiler/pdecvar.pas @@ -653,7 +653,8 @@ implementation if symtablestack.symtabletype=localsymtable then begin consume(_EQUAL); - tcsym:=ttypedconstsym.createtype('default'+vs.realname,tt,false); + tcsym:=ttypedconstsym.createtype('$default'+vs.realname,tt,false); + include(tcsym.symoptions,sp_internal); vs.defaultconstsym:=tcsym; symtablestack.insert(tcsym); readtypedconst(tt,tcsym,false); diff --git a/tests/webtbs/tw4574.pp b/tests/webtbs/tw4574.pp new file mode 100644 index 0000000000..674043eaf7 --- /dev/null +++ b/tests/webtbs/tw4574.pp @@ -0,0 +1,13 @@ +{ %OPT=-vh -Seh } + +procedure t; +var + i: integer = 5; + defaulti: integer; +begin + writeln(i); +end; + +begin + t; +end.