This commit is contained in:
parent
f1585e77c1
commit
592ef8f783
13
TestSuite/case7.pas
Normal file
13
TestSuite/case7.pas
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
var i: integer;
|
||||
|
||||
procedure p1(s: string) :=
|
||||
case s of
|
||||
else Inc(i);
|
||||
end;
|
||||
|
||||
begin
|
||||
p1('abc');
|
||||
p1('');
|
||||
p1(nil);
|
||||
assert(i = 3);
|
||||
end.
|
||||
|
|
@ -10928,7 +10928,7 @@ namespace PascalABCCompiler.TreeConverter
|
|||
context.leave_code_block();
|
||||
if (ifn == null)
|
||||
{
|
||||
ifn = new if_node(en, new statements_list(null), null, get_location(_case_node));
|
||||
ifn = new if_node(new bool_const_node(false, null), new statements_list(null), null, get_location(_case_node));
|
||||
main_ifn = ifn;
|
||||
}
|
||||
ifn.else_body = else_statement;
|
||||
|
|
|
|||
Loading…
Reference in a new issue