diff mbox

[Ada] Spurious error on binary operator in instance

Message ID 20160420104055.GA64242@adacore.com
State New
Headers show

Commit Message

Arnaud Charlet April 20, 2016, 10:40 a.m. UTC
This patch updates the mechanism which qualifies universal literals that act as
operands of binary or unary operators to avoid the partial qualification of the
subtype_mark when the immediate scope of the corresponding actual parameter is
a generic unit. No simple reproducer possible.

Tested on x86_64-pc-linux-gnu, committed on trunk

2016-04-20  Hristian Kirtchev  <kirtchev@adacore.com>

	* sem_ch12.adb (Qualify_Type): Do not perform
	partial qualification when the immediate scope is a generic unit.
diff mbox

Patch

Index: sem_ch12.adb
===================================================================
--- sem_ch12.adb	(revision 235256)
+++ sem_ch12.adb	(working copy)
@@ -14052,7 +14052,7 @@ 
          begin
             Result := Make_Identifier (Loc, Chars (Typ));
 
-            if Present (Scop) and then Scop /= Standard_Standard then
+            if Present (Scop) and then not Is_Generic_Unit (Scop) then
                Result :=
                  Make_Selected_Component (Loc,
                    Prefix        => Make_Identifier (Loc, Chars (Scop)),