* add no internal flag when folding constants in taddnode.simplify, resolves #39308

This commit is contained in:
florian 2021-10-12 22:59:17 +02:00
parent 099a927331
commit 00d4a6889d
2 changed files with 11 additions and 2 deletions

View File

@ -788,8 +788,6 @@ implementation
else
internalerror(2008022101);
end;
if not forinline then
include(t.flags,nf_internal);
result:=t;
exit;
end

11
tests/webtbf/tw39308.pp Normal file
View File

@ -0,0 +1,11 @@
{ %fail }
{ %opt=-Sew }
program project1;
var
a: byte;
begin
a:=1;
if 1 > 2 then
a := 0; // <= no warning
writeln(a);
end.