diff --git a/ada/nodes.lkt b/ada/nodes.lkt index 0dcd01a1e..863107b97 100644 --- a/ada/nodes.lkt +++ b/ada/nodes.lkt @@ -12267,7 +12267,10 @@ class Name: Expr { dn.suffix.xref_type_equation() } - case i: BaseId => %eq(i.ref_var(), i.designated_type_impl()) + case i: BaseId => i.designated_type_impl.do( + (type) => %eq(i.ref_var(), type), + default_val=self.undefined_reference_equation() + ) case ar: AttributeRef => ar.prefix.xref_type_equation() and ( if ar.attribute.sym() == s"Class" then %eq(ar.prefix.ref_var(), ar.ref_var(), conv_prop=BaseTypeDecl.classwide_type) elif ar.attribute.sym() == s"Base" then %eq(ar.prefix.ref_var(), ar.ref_var(), conv_prop=BaseTypeDecl.scalar_base_type) diff --git a/testsuite/tests/name_resolution/W117-011_many_accesses/test.out b/testsuite/tests/name_resolution/W117-011_many_accesses/test.out index 63cdde286..54c1bf813 100644 --- a/testsuite/tests/name_resolution/W117-011_many_accesses/test.out +++ b/testsuite/tests/name_resolution/W117-011_many_accesses/test.out @@ -6,9 +6,9 @@ Resolving xrefs for node Name resolution failed as expected with: -test.adb:12:7: error: expected , got -12 | G'Access & - | ^^^^^^^^ +test.adb:5:17: error: no such entity +5 | V : constant Missing_Vector := + | ^^^^^^^^^^^^^^