sem_ch12.adb (Check_Generic_Actuals): Use first subtype of actual when capturing…
sem_ch12.adb (Check_Generic_Actuals): Use first subtype of actual when capturing size information... 2007-04-06 Ed Schonberg <schonberg@adacore.com> Gary Dismukes <dismukes@adacore.com> * sem_ch12.adb (Check_Generic_Actuals): Use first subtype of actual when capturing size information, instead of base type, which for a formal array type will be the unconstrained type. (Analyze_Formal_Object_Declaration): Add check for illegal default expressions for a formal in object of a limited type. (Instantiate_Object): Ditto. (Check_Formal_Package_Instance): Skip entities that are formal objects, because they were defaulted in the formal package and no check applies to them. (Check_Formal_Package_Instance): Extend conformance check to other discrete types beyond Integer. (Process_Default): Copy directly the unmatched formal. A generic copy has already been performed in Analyze_Formal_Package. (Analyze_Associations): If a formal subprogram has no match, check for partial parametrization before looking for a default, to prevent spurious errors. (Analyze_Package_Instantiation, Analyze_Subprogram_Instantiation): Do not set the instantiation environment before analyzing the actuals. Fixes regression on 8515-003 with implementation of AI-133. Set_Instance_Env checks whether the generic unit is a predefined unit, in which case the instance must be analyzed with the latest Ada mode. This setting must take place after analysis of the actuals, because the actuals must be analyzed and frozen in the Ada mode extant outside of the current instantiation. (Save_Env, Restore_Env): Preserve and restore the configuration parameters so that predefined units can be compiled in the proper Ada mode. (Analyze_Formal_Object_Declaration,Analyze_Formal_Subprogram, Instantiate_Type): Split Is_Abstract flag into Is_Abstract_Subprogram and Is_Abstract_Type. (Analyze_Formal_Package): For better error recovery, Add exception handler to catch Instantion_Error, which can be raised in Analyze_Associations From-SVN: r123593
Showing
This source diff could not be displayed because it is too large.
You can
view the blob
instead.
Please
register
or
sign in
to comment