]> gcc.gnu.org Git - gcc.git/commit - gcc/ada/sem_ch3.adb
ada: Fix type derivation of subtype of derived type
authorMarc Poulhiès <poulhies@adacore.com>
Mon, 22 May 2023 11:59:05 +0000 (13:59 +0200)
committerMarc Poulhiès <poulhies@adacore.com>
Tue, 20 Jun 2023 07:30:48 +0000 (09:30 +0200)
commitca27b8a030746d09ea61de62e1f3bc1337ebe737
tree0ea947306c1a1e84f44fdd46e1c4f9a2586af918
parent2071134b54aa4f9af01d7d6212dacf7747168448
ada: Fix type derivation of subtype of derived type

Deriving from a subtype of a derived type of a private type, whose full
view is itself a derived type of a discriminated record with a known
discriminatant was failing with the error message:

  invalid constraint: type has no discriminant

The compiler needs to use the full view to be able to constrain the
type.

Also fix minor typo in comments.

gcc/ada/

* sem_ch3.adb (Build_Derived_Record_Type): Use full view as
Parent_Base if needed.
gcc/ada/sem_ch3.adb
This page took 0.055624 seconds and 5 git commands to generate.