[Ada] Return when not working for procedures
gcc/ada/ * par-ch6.adb (Get_Return_Kind): Properly handle the case of a "return when" statement in the procedure case.
This commit is contained in:
parent
f037632e65
commit
c7959e489d
|
@ -1903,6 +1903,11 @@ package body Ch6 is
|
|||
end if;
|
||||
|
||||
Restore_Scan_State (Scan_State); -- to identifier
|
||||
|
||||
elsif Token = Tok_When then
|
||||
Error_Msg_GNAT_Extension ("return when statement");
|
||||
|
||||
Result := Return_When;
|
||||
end if;
|
||||
|
||||
return Result;
|
||||
|
|
Loading…
Reference in New Issue