Bug#780031: gnat-4.9: result attribute fails in postcondition of generic functions
Package: gnat-4.9
Version: 4.9.1-4
Severity: minor
Tags: upstream
Hello.
The following source produces an error message.
generic_f.ads:2:48: "Result" attribute can only appear in postcondition of function
It compiles when "generic" or the postcondition is removed.
generic
function Generic_F return Integer
with Post => Generic_F'Result = 0;
function Generic_F return Integer is
begin
return 0;
end Generic_F;
Reply to: