From e292f36963c9cbce2dbf044ea86d9581c291a321 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Laurent=20Th=C3=A9venoux?= Date: Mon, 3 Jun 2024 14:11:38 +0200 Subject: [PATCH] Remove useless code in Adanode.gnat_xref Now that internal nodes are bypassed by DefiningName.basic_decl property, this case in Adanode.gnat_xref is no longer required. Note that it was also not correct since bypassing internal nodes introduces progressions in out gnat_compare tests. --- ada/ast.py | 6 ------ 1 file changed, 6 deletions(-) diff --git a/ada/ast.py b/ada/ast.py index 72c3998f4..52e42661e 100644 --- a/ada/ast.py +++ b/ada/ast.py @@ -1927,12 +1927,6 @@ def gnat_xref(): dbd.is_a(T.ParamSpec), dbd.cast(T.ParamSpec).decl_param(ret), - dbd.is_a(T.GenericSubpInternal, T.GenericPackageInternal), - dbd.generic_instantiations.at(0).then( - lambda gi: gi.cast_or_raise(T.BasicDecl).defining_name, - default_val=ret - ), - dbd.is_a(T.ObjectDecl), # Since dbd can refer to an object declaration with # multiple defining names, do not call `public_part_decl`