From: Gautier write-only address <gautier_niouzes@hotmail.com>
Subject: Re: Question on variant/discriminated records
Date: Thu, 31 Dec 2020 04:46:45 -0800 (PST) [thread overview]
Message-ID: <ba97a48d-6e75-49e8-8a62-a5dea3c6189cn@googlegroups.com> (raw)
In-Reply-To: <6dd44b3c-b3de-4943-ac70-0e25eaf279efn@googlegroups.com>
On Thursday, December 31, 2020 at 1:24:25 PM UTC+1, reinert wrote:
> Here must be a hole in my understanding. I thought that the discriminant must be known
> before V.Y := 1.0; and hence there should be no confusion?
Imagine you have a function Evaluate (r : rec1_Type) return Float.
Except in trivial cases like
if r.option1 = b then result := result + r.y; end if;
the compiler cannot guess the value of the discriminant.
next prev parent reply other threads:[~2020-12-31 12:46 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-31 10:38 Question on variant/discriminated records reinert
2020-12-31 10:52 ` J-P. Rosen
2020-12-31 12:24 ` reinert
2020-12-31 12:46 ` Gautier write-only address [this message]
2020-12-31 12:57 ` reinert
2020-12-31 13:29 ` DrPi
2020-12-31 16:06 ` Gautier write-only address
2020-12-31 15:03 ` Dmitry A. Kazakov
2021-01-01 9:19 ` reinert
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox