* parent type must not be outside generic body
@ 2002-11-16 22:26 Victor Porton
2002-11-17 2:28 ` Eric G. Miller
0 siblings, 1 reply; 2+ messages in thread
From: Victor Porton @ 2002-11-16 22:26 UTC (permalink / raw)
1. What in ARM95 deprecated this?
2. What are methods of workaround of this where to
declare this type?
x.adb:3:24: parent type must not be outside generic body
x.ads:
generic
package X is
type Base is tagged null record;
procedure P;
end;
x.adb:
package body X is
type Derived is new Base with null record;
procedure P is
begin
null;
end;
end X;
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: parent type must not be outside generic body
2002-11-16 22:26 parent type must not be outside generic body Victor Porton
@ 2002-11-17 2:28 ` Eric G. Miller
0 siblings, 0 replies; 2+ messages in thread
From: Eric G. Miller @ 2002-11-17 2:28 UTC (permalink / raw)
In <3dd6c668$0$301$bed64819@news.gradwell.net>, Victor Porton wrote:
> 1. What in ARM95 deprecated this?
Maybe...
3.9.1 Type Extensions
4
A type extension shall not be declared in a generic body if the parent
type is declared outside that body.
> 2. What are methods of workaround of this where to
> declare this type?
Maybe use a private section in the generic spec?
generic
package Foo_Generic is
type Foo is tagged null record;
private
type Bar is new Foo with null record;
end Foo_Generic;
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2002-11-17 2:28 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-11-16 22:26 parent type must not be outside generic body Victor Porton
2002-11-17 2:28 ` Eric G. Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox