summaryrefslogtreecommitdiffstats
path: root/txr.1
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2019-12-09 20:20:48 -0800
committerKaz Kylheku <kaz@kylheku.com>2019-12-09 20:20:48 -0800
commit983a0d26b0d119e0cac73e1a529541c253436d9e (patch)
tree52465e2c8f6d5b30013318160f58b80f3e2750b8 /txr.1
parente7cb34ec471b9a212ed9d7b067c5f0bd5282c89f (diff)
downloadtxr-983a0d26b0d119e0cac73e1a529541c253436d9e.tar.gz
txr-983a0d26b0d119e0cac73e1a529541c253436d9e.tar.bz2
txr-983a0d26b0d119e0cac73e1a529541c253436d9e.zip
doc: clarify inheritance of static slot value.
* txr.1: In relation of the previous bugfix, a certain situation is worth clarifying. A static slot does not inherit the value of a grandparent type's static slot of the same name, if the supertype has specified that slot as an instance slot. Inheritance of the static slot value is from the direct supertype only.
Diffstat (limited to 'txr.1')
-rw-r--r--txr.131
1 files changed, 31 insertions, 0 deletions
diff --git a/txr.1 b/txr.1
index 5ea0cac6..450cbca7 100644
--- a/txr.1
+++ b/txr.1
@@ -25267,6 +25267,37 @@ but are of a different kind: an instance slot in the supertype
can be replaced by a static slot in the derived type or
.IR "vice versa" .
+Note that, in light of the above type overriding possibility, the static slot
+value propagation happens only from the immediate supertype.
+If
+.code D
+is is derived from
+.code G
+which has a static slot
+.codn s ,
+whereas
+.code D
+specifies
+.code s
+as an instance slot, but then
+.code B
+again specifies a static slot
+.codn s ,
+then
+.codn B 's
+slot
+.code s
+will not inherit the value from
+.codn G 's
+.code s
+slot.
+Simply,
+.codn B 's
+supertype is
+.code D
+and that supertype is not considered to have a static slot
+.codn s .
+
A structure type is associated with a static initialization function
which may be used to store initial values into static slots. This function
is invoked once in a type's life time, when the type is created.