* Possible GNAT bug w/ tasks and expression functions.
@ 2014-10-10 0:30 Shark8
0 siblings, 0 replies; only message in thread
From: Shark8 @ 2014-10-10 0:30 UTC (permalink / raw)
I get an interesting compiler error when I try to replace this
> -- Gen handles the actual creation of a new task and state.
> Function Gen(P : Peg; G : not null access Generate) return Generator is
> begin
> return
> (if G.Pegs(P) then null
> else new Generate(
> Pegs => new Used_Peg'(G.Pegs.all & P),
> State => New Partial_Board'(G.All.State.All & P)
> )
> );
> end;
with
> -- Gen handles the actual creation of a new task and state.
> Function Gen(P : Peg; G : not null access Generate) return Generator is
> (if G.Pegs(P) then null
> else new Generate(
> Pegs => new Used_Peg'(G.Pegs.all & P),
> State => New Partial_Board'(G.All.State.All & P)
> )
> );
As you can see, it is simply the transformation between the "proper
subprogram" form and the expression-function form; something which the
ARM says is equivalent.
Fully compilable code here:
http://rosettacode.org/wiki/Solve_the_no_connection_puzzle#Ada
I was wondering if any of you have hit this issue as well.
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2014-10-10 0:30 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-10-10 0:30 Possible GNAT bug w/ tasks and expression functions Shark8
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox