]> git.ipfire.org Git - thirdparty/gcc.git/commit
ada: Cannot override inherited function with controlling result
authorJavier Miranda <miranda@adacore.com>
Thu, 30 May 2024 11:24:54 +0000 (11:24 +0000)
committerMarc Poulhiès <poulhies@adacore.com>
Fri, 21 Jun 2024 08:34:20 +0000 (10:34 +0200)
commitdf0637007e08eb11ead3ba4ac76de2b69a115327
tree3d4caef59eb19260da4f65be638986b3ac59b0bb
parent2b55cc520cf51089d961414a78e6e5371f3c3e20
ada: Cannot override inherited function with controlling result

When a package has the declaration of a derived tagged
type T with private null extension that inherits a public
function F with controlling result, and a derivation of T
is declared in the public part of another package, overriding
function F may be rejected by the compiler.

gcc/ada/

* sem_disp.adb (Find_Hidden_Overridden_Primitive): Check
public dispatching primitives of ancestors; previously,
only immediately-visible primitives were checked.
gcc/ada/sem_disp.adb