diff options
author | Ronan Desplanques <desplanques@adacore.com> | 2022-10-24 11:50:06 +0200 |
---|---|---|
committer | Marc Poulhiès <poulhies@adacore.com> | 2022-11-08 09:35:02 +0100 |
commit | 45656a992eb18bfefe2e6e20d3b425afe945af28 (patch) | |
tree | a72c8da1b7fce47af8249b860cd94deebff9711f /gcc/objc/objc-lang.c | |
parent | 48e2e5b4c2f56b9e3497d57d0974c66604e087a6 (diff) | |
download | gcc-45656a992eb18bfefe2e6e20d3b425afe945af28.zip gcc-45656a992eb18bfefe2e6e20d3b425afe945af28.tar.gz gcc-45656a992eb18bfefe2e6e20d3b425afe945af28.tar.bz2 |
ada: Adjust classwide contract expression preanalysis
Before this patch, a classwide contract expression was preanalyzed
only when its primitive operation's type was frozen. It caused name
resolution to be off in the cases where the freezing took place
after the end of the declaration list the primitive operation was
declared in.
This patch makes it so that if the compiler gets to the end of
the declaration list before the type is frozen, it preanalyzes the
classwide contract expression, so that the names are resolved in the
right context.
gcc/ada/
* contracts.adb
(Preanalyze_Class_Conditions): New procedure.
(Preanalyze_Condition): Moved out from Merge_Class_Conditions in
order to be spec-visible.
* contracts.ads
(Preanalyze_Class_Conditions): New procedure.
* sem_prag.adb
(Analyze_Pre_Post_Condition_In_Decl_Part): Call
Preanalyze_Class_Conditions when necessary.
Diffstat (limited to 'gcc/objc/objc-lang.c')
0 files changed, 0 insertions, 0 deletions