CVS difference for ai12s/ai12-0103-1.txt
--- ai12s/ai12-0103-1.txt 2014/11/14 02:30:41 1.3
+++ ai12s/ai12-0103-1.txt 2015/01/20 23:12:10 1.4
@@ -1,4 +1,4 @@
-!standard 13.14(3/3) 14-11-13 AI12-0103-1/03
+!standard 13.14(3/3) 15-01-19 AI12-0103-1/04
!class binding interpretation 14-05-12
!status Corrigendum 2015 14-11-13
@@ -45,7 +45,7 @@
Is_Empty (2) is an expression function representing a completion, but 13.14(3/3)
only applies in declarative_parts, while this is a package specification. So the
-expression function Is_Empty is does not cause freezing at (2).
+expression function Is_Empty does not cause freezing at (2).
The completion of Empty_Priv at (3) is OK, as there is no requirement that
Is_Empty uses only complete types.
@@ -57,7 +57,8 @@
incomplete deferred constant), but it could be made legal by erasing the
declaration at (1).
-Is this correct? (Not quite.)
+So, which freezing rules apply to expression_functions used as completions?
@@ -116,12 +117,12 @@
renames-as-bodies are excluded from the "freeze everything" rules (despite
acting as a body).
-This is necessary so that the occurrence of one of these implicit bodies don't
-freeze unrelated entities from outer scopes.
+This is necessary so that the occurrence of one of these implicit bodies
+doesn't freeze unrelated entities from outer scopes.
Moreover, it's clear that 13.14(3/3) does not apply to package specifications.
The reason for the rule, as explained by the following AARM notes, is that we
-want interchangability of bodies (of all kinds) with body stubs (which have
+want interchangeability of bodies (of all kinds) with body stubs (which have
to be freezing, because we can't know their contents). However, body stubs are
not allowed in package specifications. So there is no need to have rules that
emulate having those.
@@ -131,12 +132,12 @@
such, we should require as little freezing as possible to avoid semantic
-The primary argument for expression functions as completions freezing is for
-consistency with other bodies. But that is misleading, as renames-as-bodies are
-not freezing. So changing from a renames-as-body to an expression function to an
-regular body has to change freezing somewhere. Specifically, all of the following
-have essentially the same effect (assume Bar is a function, and these Foos are
+The primary argument for expression functions as completions causing freezing
+is for consistency with other bodies. But that is misleading, as
+renames-as-bodies are not freezing. So changing from a renames-as-body to an
+expression function to an regular body has to change freezing somewhere.
+Specifically, all of the following have essentially the same effect (assume
+Bar is a function, and these Foos are all completions):
function Foo return Integer renames Bar; -- Never freezing
Questions? Ask the ACAA Technical Agent