From: Stephen Leake <stephen_leake@stephe-leake.org>
Subject: Re: troubles learning OOP: expected type "Parent.Some_Child", found type Parent'Class
Date: Tue, 13 Feb 2018 00:00:38 -0800 (PST)
Date: 2018-02-13T00:00:38-08:00 [thread overview]
Message-ID: <ba924677-4989-48e4-9afc-74a639b760d3@googlegroups.com> (raw)
In-Reply-To: <982639bc-8e7e-4c43-a1ff-cf9fa7c0d0ed@googlegroups.com>
On Monday, February 12, 2018 at 3:18:38 PM UTC-6, Mehdi Saada wrote:
> the components are all enumeration types of one character, except for T_TOKEN_OPERANDE.OPERANDE who's an INTEGER.
> Ahhh... The trick is to encapsulate the components of different types into tagged types, so that they can be grouped together into a class, and so GET_ELEM can be dispatched. That's awfully artifical. Unfortunately, I must keep with the current design,
> with things like
> type T_TOKEN is abstract tagged null record;
> type T_TOKEN_OPERANDE is new T_TOKEN with record
> OPERANDE: INTEGER;
> end record;
In addition, as Simon pointed out, Get_Elem must be a "primitive operation" of T_Token, and overridden for T_Token_Operande, so it will dispatch on a class-wide object.
next prev parent reply other threads:[~2018-02-13 8:00 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-12 16:29 troubles learning OOP: expected type "Parent.Some_Child", found type Parent'Class Mehdi Saada
2018-02-12 17:44 ` Jeffrey R. Carter
2018-02-12 18:17 ` Mehdi Saada
2018-02-12 18:24 ` Dmitry A. Kazakov
2018-02-12 18:42 ` Simon Wright
2018-02-12 20:25 ` Jeffrey R. Carter
2018-02-12 21:18 ` Mehdi Saada
2018-02-12 22:40 ` Simon Wright
2018-02-12 23:12 ` Mehdi Saada
2018-02-13 8:00 ` Stephen Leake [this message]
2018-02-13 17:42 ` Jeffrey R. Carter
2018-02-13 17:56 ` Dmitry A. Kazakov
2018-02-12 21:19 ` Mehdi Saada
2018-02-12 18:40 ` Simon Wright
2018-02-12 21:39 ` Mehdi Saada
2018-02-12 21:43 ` Mehdi Saada
2018-02-12 22:22 ` Mehdi Saada
2018-02-13 17:46 ` Jeffrey R. Carter
2018-02-13 20:19 ` Mehdi Saada
2018-02-13 21:24 ` Bojan Bozovic
2018-02-13 23:03 ` Mehdi Saada
2018-02-13 23:03 ` Mehdi Saada
2018-02-14 7:00 ` Bojan Bozovic
2018-02-14 12:04 ` Mehdi Saada
2018-02-16 23:40 ` Mehdi Saada
2018-02-17 1:13 ` Mehdi Saada
2018-02-13 0:01 ` Mehdi Saada
2018-02-13 0:42 ` Mehdi Saada
2018-02-13 1:32 ` Mehdi Saada
2018-02-13 4:16 ` Bojan Bozovic
2018-02-13 11:28 ` Simon Wright
2018-02-13 12:03 ` Mehdi Saada
2018-02-13 13:25 ` Dmitry A. Kazakov
2018-02-19 18:10 ` Mehdi Saada
2018-02-19 18:16 ` Simon Clubley
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox