Message ID | 20170906094758.GA111188@adacore.com |
---|---|
State | New |
Headers | show |
Series | [Ada] Resolution of set membersip operations with overloaded alternatives | expand |
Index: sem_ch4.adb =================================================================== --- sem_ch4.adb (revision 251753) +++ sem_ch4.adb (working copy) @@ -2935,11 +2935,20 @@ -- for all of them. Set_Etype (Alt, It.Typ); + + -- If the alternative is an enumeration literal, use + -- the one for this interpretation. + + if Is_Entity_Name (Alt) then + Set_Entity (Alt, It.Nam); + end if; + Get_Next_Interp (Index, It); if No (It.Typ) then Set_Is_Overloaded (Alt, False); Common_Type := Etype (Alt); + end if; Candidate_Interps := Alt;