From 2152cfdea76e6c360e7c3243752cf5f146b63264 Mon Sep 17 00:00:00 2001 From: sgrekhov Date: Wed, 4 Dec 2024 11:13:47 +0200 Subject: [PATCH] Fix some typos in the static access shorthand proposal --- .../proposal-simple-lrhn.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/working/3616 - enum value shorthand/proposal-simple-lrhn.md b/working/3616 - enum value shorthand/proposal-simple-lrhn.md index 9074a1d4b..74d640630 100644 --- a/working/3616 - enum value shorthand/proposal-simple-lrhn.md +++ b/working/3616 - enum value shorthand/proposal-simple-lrhn.md @@ -37,7 +37,7 @@ We introduce grammar productions of the form: ::= ... -- all current productions | -- No selectors, no `.new`. - ::= + ::= * ::= @@ -91,7 +91,7 @@ Future futures = .wait([lazyString(), lazyString()]).then((list) => list This is a simple grammatical change. It allows new constructs in any place where we currently allow primary expressions followed by selector chains through the `` production ` *`, -and now also ` `. +and now also ` *`. The new grammar is added as a separate production, rather than making `` a ``, and sharing the `*` @@ -163,7 +163,7 @@ First, when inferring types for a `` of the form `` with context type scheme *C*, then assign *C* as the shorthand context of the leading ``. Then continue inferring a type for the entire `` -recursively on the chain of selectors of the ``, +recursively on the chain of selectors of the `*`, in the same way as for a ` *`. _This assigns the context type scheme of the entire, maximal selector chain to the static member shorthand head, moving it past any intermediate ``s._ @@ -265,10 +265,10 @@ this expression may have an actual context type. If it was followed by "real" se like `.parse(input).abs()`, then the recognized expression, `.parse(input)` in this example, likely has no context type._ -Expressions of the forms .new\<*typeArgs*\> or +Expressions of the forms .new\<*typeArgs*\>(*args*) or .new\<*typeArgs*\> (as a prefix of a ` *` production, or the entire chain) are compile-time errors, just like -the corresponding *T*.new\<*typeArgs*\> +the corresponding *T*.new\<*typeArgs*\>(*args*) and *T*.new\<*typeArgs*\> already are, whether used as instantiated tear-off or invoked. _(The grammar allows them, because `C.new` is a `` expression, but