[Ada] Improve expected type error messages
authorJustin Squirek <squirek@adacore.com>
Mon, 31 Jan 2022 21:51:38 +0000 (21:51 +0000)
committerPierre-Marie de Rodat <derodat@adacore.com>
Fri, 13 May 2022 08:04:32 +0000 (08:04 +0000)
commit6a28d40dc4dd47431cc52edbb8b1994f81aa1748
tree6dd2fe2ee289f89c6a57047d2052b5d1f00c48a6
parentcf54619a8e33d2494b9f216f27d0110b8e0a4e49
[Ada] Improve expected type error messages

This patch improves error messages concerning type mismatches by
printing the actual expected type in more cases instead of the expected
type's first subtype.

gcc/ada/

* sem_util.adb (Wrong_Type): Avoid using the first subtype of
the expected type in error messages when the expected type is
not internally generated.
gcc/ada/sem_util.adb