ada: Fix remaining failures in Roman Numbers test
commit5c934733eb116cf9742798bd571f147f0eb7086a
authorEric Botcazou <ebotcazou@adacore.com>
Wed, 5 Apr 2023 18:43:54 +0000 (5 20:43 +0200)
committerMarc Poulhiès <poulhies@adacore.com>
Mon, 29 May 2023 08:23:20 +0000 (29 10:23 +0200)
tree04a34d6173a219f534732464bf3a9ea55a0ddd92
parent5ad28c8ff6a78082eaa836c2d475ffb6b0b6f08b
ada: Fix remaining failures in Roman Numbers test

The test is inspired from the example of user-defined literals given in the
Ada 2022 RM.  Mixed Arabic numbers/Roman numbers computations are rejected
because the second resolution pass would try to resolve Arabic numbers only
as user-defined literals.

gcc/ada/

* sem_res.adb (Try_User_Defined_Literal): For arithmetic operators,
also accept operands whose type is covered by the resolution type.
gcc/ada/sem_res.adb