diff --git a/lang/spec.html b/lang/spec.html index 8e7fcce6..4124c7be 100644 --- a/lang/spec.html +++ b/lang/spec.html @@ -4104,10 +4104,15 @@
K
and the static
+type of key-expression must be a subtype of K
, where the
+static type of container-expression is table<R>
+key<K>
;()
; otherwise, the result is the member
+of c with key k.()
or c
-does not contain a member with key k, then the result is
-()
; otherwise, the result is the member of c with key
-k.()
;
+otherwise, the result is the member of c with key k.
@@ -4143,8 +4150,9 @@ string:Char
, that is the subtype of
strings containing strings of length 1. If T is a subtype of xml<M>, then
the static type of the member-access-expr is M|E, where E is the type of the
-empty xml value. Otherwise, let K be the static type of key-expression and
-let M be the member type of K in T; if T contains nil, or T is a subtype of
+empty xml value. If T is a subtype of table<R>, then the static type of
+member-access-expr is R?. Otherwise, let K be the static type of key-expression
+and let M be the member type of K in T; if T contains nil, or T is a subtype of
mapping and K is an optional key type for T, then the static type of the
member-access-expr is M?, otherwise the static type is M.