Commit 477bd732 by Arnaud Charlet

[multiple changes]

2010-10-04  Robert Dewar  <dewar@adacore.com>

	* sem_res.adb, sinput-l.adb: Minor reformatting.

2010-10-04  Hristian Kirtchev  <kirtchev@adacore.com>

	* exp_ch5.adb (Expand_N_Assignment_Statement): Do not generate a tag
	check when the target object is an interface since the expression of
	the right hand side must only cover the interface.

From-SVN: r164935
parent ea4ce0f7
2010-10-04 Robert Dewar <dewar@adacore.com>
* sem_res.adb, sinput-l.adb: Minor reformatting.
2010-10-04 Hristian Kirtchev <kirtchev@adacore.com>
* exp_ch5.adb (Expand_N_Assignment_Statement): Do not generate a tag
check when the target object is an interface since the expression of
the right hand side must only cover the interface.
2010-10-04 Vincent Celier <celier@adacore.com>
* frontend.adb: Set Lib.Parsing_Main_Extended_Source to True before
......
......@@ -1956,6 +1956,12 @@ package body Exp_Ch5 is
if Is_Class_Wide_Type (Typ)
and then Is_Tagged_Type (Typ)
and then Is_Tagged_Type (Underlying_Type (Etype (Rhs)))
-- Do not generate a tag check when the target object is
-- an interface since the expression of the right hand
-- side must only cover the interface.
and then not Is_Interface (Typ)
then
Append_To (L,
Make_Raise_Constraint_Error (Loc,
......
......@@ -556,8 +556,9 @@ package body Sinput.L is
-- the source has been modified by the preprocessing. Only
-- do that for the main unit (spec, body and subunits).
if Generate_Processed_File and then
Modified and then
if Generate_Processed_File
and then Modified
and then
((Compiler_State = Parsing
and then Parsing_Main_Extended_Source)
or else
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment