!standard 8.3(16) 10-04-02 AI05-0205-1/02 !standard 8.3(17/2) !class binding interpretation 10-02-15 !status Amendment 2012 10-04-02 !status ARG Approved 10-0-0 10-02-28 !status work item 10-02-15 !status received 09-12-05 !priority Low !difficulty Easy !qualifier Omission !subject An extended return statement declares a name usable inside the statement !summary An extended_return_statement declares a name for a return object that is visible after the reserved word "do" (if any). !question 3.1(6) defines an extended_return_statement to be a declaration of its defining_identifier. 8.3(16) says that a declaration is hidden from all visibility until the end of the declaration. This means that in: return X : T do X := Foobar; -- Error? (No.) end return; The reference to X in the body is illegal by 8.3(16) as it is hidden from all visibility. This cannot be what was intended (X wouldn't be visible anywhere). What is intended? !recommendation (See Summary.) !wording Add after 8.3(17/2): * For an extended_return_statement, the declaration is hidden from all visibility only until the reserved word do of the statement; !discussion Clearly, the intent is that the name is visible in the handled_sequence_of_statements of the extended_return_statement. Any other interpretation about make extended returns pointless. The alternative of changing the syntax is heavier than simply adopting a rule similar to that used for program units. Thus we add an additional bullet to 8.3. !corrigendum 8.3(17/2) @dinsa @xbullet