summaryrefslogtreecommitdiff
path: root/gcc/ada/sem_util.adb
diff options
context:
space:
mode:
authorcharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2015-05-28 10:48:29 +0000
committercharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2015-05-28 10:48:29 +0000
commit19e4694bc320852602230de9eccea611ef01da19 (patch)
tree6a53879ef2ea6f4d4f74d2e4eb820b3f62cb5f2a /gcc/ada/sem_util.adb
parentdd7f667eac96d16a952b0e129e42379bc9188791 (diff)
downloadgcc-19e4694bc320852602230de9eccea611ef01da19.tar.gz
2015-05-28 Ed Schonberg <schonberg@adacore.com>
* sem_util.adb (Wrong_Type): In any instance, do not emit error if type of expression is the partial view of the expected type. 2015-05-28 Ed Schonberg <schonberg@adacore.com> * sem_res.adb (Resolve_Actuals): a) The replacement of formal names in named associations only needs to be done within an instance, on a call to a primitive of a formal derived type, where the actual subprogram may have different formal names than those of the primitive operation of the formal type. b) Defaulted parameters must be taken into account when obtaining the names of the formals of the actual subprogram being called. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@223804 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/sem_util.adb')
-rw-r--r--gcc/ada/sem_util.adb9
1 files changed, 9 insertions, 0 deletions
diff --git a/gcc/ada/sem_util.adb b/gcc/ada/sem_util.adb
index d749ea1c5fe..3fe6d67787b 100644
--- a/gcc/ada/sem_util.adb
+++ b/gcc/ada/sem_util.adb
@@ -19027,6 +19027,15 @@ package body Sem_Util is
and then Covers (Full_View (Expected_Type), Etype (Expr))
then
return;
+
+ -- Conversely, type of expression may be the private one.
+
+ elsif Is_Private_Type (Base_Type (Etype (Expr)))
+ and then Full_View (Base_Type (Etype (Expr))) =
+ Expected_Type
+ then
+ return;
+
end if;
end if;