* WG: Structured exception information
@ 2007-01-16 11:06 Grein, Christoph (Fa. ESG)
0 siblings, 0 replies; only message in thread
From: Grein, Christoph (Fa. ESG) @ 2007-01-16 11:06 UTC (permalink / raw)
To: comp.lang.ada
Note that the full type need not have a discriminant:
package P is
type T (<>) is private;
function Constructor (S: String) return T;
private
type T is record
null;
end record;
end P;
Your program seems correct with a little change, however return of
limited
types is not yet implemented in Gnat:
private with Ada.Finalization;
package P is
type T (<>) is limited private;
function Constructor (S: String) return T;
private
type T (I: Integer) is new Ada.Finalization.Limited_Controlled with
record
null;
end record;
end P;
package body P is
function Constructor (S: String) return T is
begin
return (Ada.Finalization.Limited_Controlled with I => 0);
end Constructor;
end P;
with P;
procedure Hello is
X: P.T := P.Constructor ("some params");
begin
null;
end Hello;
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2007-01-16 11:06 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-01-16 11:06 WG: Structured exception information Grein, Christoph (Fa. ESG)
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox