!standard 10.1.1(12.3/2) 08-11-23 AI05-0129-1/01 !class binding interpretation 08-11-23 !status work item 08-11-23 !status received 08-11-23 !priority Low !difficulty Medium !qualifier Error !subject A limited view does not contain views of incomplete types !summary A limited view of a package does not contain incomplete views of incomplete types declared in the package. !question A question raised by discussion of the ASIS semantic subsystem at the Portland ARG meeting has led to discovery of a bug in the Ada Standard. Someone wondered if the definition of completion was clear in the case of an incomplete view that is declared in a limited view for an incomplete type. For instance, in the limited view of the following package: package P is type T; -- (1) type Acc_T is access T; type T is null record; -- (2) end P; is the completion of T declaration (1) or (2)? The question arises because both (1) and (2) are type_declarations by 3.2.1(2), so 10.1.1(12.3/2) says that an incomplete view is defined for both declarations. The language does not provide a way to chose between them, indeed, they would appear to be illegal homographs. What is the intent here? !recommendation (See Summary.) !wording Modify 10.1.1(12.3/3): For each type_declaration {that is not an incomplete_type_declaration} in the visible part, an incomplete view of the type; if the type_declaration is tagged, then the view is a tagged incomplete view. !discussion Two identical (except for the completion) incomplete views with the same name in a single scope would seem to be an illegal homograph. Neither of these declarations is the completion of the other, nor do any of the other hidden from all visibility rules apply. So 8.3(26/2) seems to say that the limited view is illegal. But of course that is nonsense; we need to hide one of the declarations somehow. But we can do better than fiddling with the visibility rules. 3.10.1(3) requires the completion of an incomplete type in a visible part to be in that same visible part. That means that there is no need for an incomplete view of the incomplete type to be declared in the limited view; there will always be an incomplete view of the completion in the same limited view. So we adjust the wording to eliminate the declaration of incomplete views of incomplete types in a limited view. !corrigendum 10.1.1(12.3/2) @drepl @xbullet in the visible part, an incomplete view of the type; if the @fa is tagged, then the view is a tagged incomplete view.> @dby @xbullet that is not an @fa in the visible part, an incomplete view of the type; if the @fa is tagged, then the view is a tagged incomplete view.> !ACATS Test An ACATS B-Test like the example in the question is needed. !appendix +****************************************************************