mirror of git://gcc.gnu.org/git/gcc.git
contracts.adb (Analyze_Contracts): For a type declaration, analyze an iterable aspect when present.
2016-10-12 Ed Schonberg <schonberg@adacore.com> * contracts.adb (Analyze_Contracts): For a type declaration, analyze an iterable aspect when present. From-SVN: r241028
This commit is contained in:
parent
d5e7854c12
commit
05662a060a
|
|
@ -1,3 +1,8 @@
|
||||||
|
2016-10-12 Ed Schonberg <schonberg@adacore.com>
|
||||||
|
|
||||||
|
* contracts.adb (Analyze_Contracts): For a type declaration, analyze
|
||||||
|
an iterable aspect when present.
|
||||||
|
|
||||||
2016-10-12 Ed Schonberg <schonberg@adacore.com>
|
2016-10-12 Ed Schonberg <schonberg@adacore.com>
|
||||||
|
|
||||||
* sem_ch12.adb (Check_Formal_Package_Instance): Handle properly
|
* sem_ch12.adb (Check_Formal_Package_Instance): Handle properly
|
||||||
|
|
|
||||||
|
|
@ -40,6 +40,7 @@ with Sem_Aux; use Sem_Aux;
|
||||||
with Sem_Ch6; use Sem_Ch6;
|
with Sem_Ch6; use Sem_Ch6;
|
||||||
with Sem_Ch8; use Sem_Ch8;
|
with Sem_Ch8; use Sem_Ch8;
|
||||||
with Sem_Ch12; use Sem_Ch12;
|
with Sem_Ch12; use Sem_Ch12;
|
||||||
|
with Sem_Ch13; use Sem_Ch13;
|
||||||
with Sem_Disp; use Sem_Disp;
|
with Sem_Disp; use Sem_Disp;
|
||||||
with Sem_Prag; use Sem_Prag;
|
with Sem_Prag; use Sem_Prag;
|
||||||
with Sem_Util; use Sem_Util;
|
with Sem_Util; use Sem_Util;
|
||||||
|
|
@ -408,6 +409,22 @@ package body Contracts is
|
||||||
N_Task_Type_Declaration)
|
N_Task_Type_Declaration)
|
||||||
then
|
then
|
||||||
Analyze_Task_Contract (Defining_Entity (Decl));
|
Analyze_Task_Contract (Defining_Entity (Decl));
|
||||||
|
|
||||||
|
-- For type declarations, we need to do the pre-analysis of
|
||||||
|
-- Iterable aspect specifications.
|
||||||
|
-- Other type aspects need to be resolved here???
|
||||||
|
|
||||||
|
elsif Nkind (Decl) = N_Private_Type_Declaration
|
||||||
|
and then Present (Aspect_Specifications (Decl))
|
||||||
|
then
|
||||||
|
declare
|
||||||
|
E : constant Entity_Id := Defining_Identifier (Decl);
|
||||||
|
It : constant Node_Id := Find_Aspect (E, Aspect_Iterable);
|
||||||
|
begin
|
||||||
|
if Present (It) then
|
||||||
|
Validate_Iterable_Aspect (E, It);
|
||||||
|
end if;
|
||||||
|
end;
|
||||||
end if;
|
end if;
|
||||||
|
|
||||||
Next (Decl);
|
Next (Decl);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue