Fix internal error on access to function as component via limited with
This commit fixes an internal compiler error related to accessing functions as components via limited with clauses in Ada.
The Ada compiler previously triggered an internal error when accessing a function as a component through a limited with clause. The issue arose from a circularity in package specifications involving function calls via access-to-function types. This commit corrects the resolution of call entities, preventing the erroneous override of the Etype and resolving the internal error.
In Details
The code generator had trouble translating package specs with circular dependencies from limited_with clauses and access-to-function types. Resolve_Call in sem_res.adb now avoids overriding the Etype of the Name entity when it's a function returning a limited view from a limited_with clause. Search context: Ada compiler limited_with access-to-function circularity Etype
For Context
Ada allows packages to be used with a limited with clause, which restricts how the package can be used. This commit fixes a bug where the compiler would crash when a function was accessed as a component of a package used with limited with, due to circular dependencies. The fix involves correcting how the compiler resolves function calls in this specific scenario. Search context: Ada compiler limited_with access-to-function circularity Etype