Skip to content

Commit a5dc410

Browse files
authored
Small feature specification fixes (#3309)
Fix return type of generic constructor tear-off. Reword short commentary in extension type spec.
1 parent 1d0933f commit a5dc410

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

accepted/2.15/constructor-tearoffs/feature-specification.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ _The syntax without type arguments is currently allowed by the language grammar,
6161

6262
A named constructor tear-off expression of one of the forms above evaluates to a function value which could be created by tearing off a *corresponding constructor function*, which would be a static function defined on the class denoted by *C*, with a fresh name here represented by adding `$tearoff`:
6363

64-
> <code>static *C* *name*$tearoff\<*typeParams*>(*params*) => *C*\<*typeArgs*>.*name*(*args*);</code>
64+
> <code>static *C*\<*typeArgs*> *name*$tearoff\<*typeParams*>(*params*) => *C*\<*typeArgs*>.*name*(*args*);</code>
6565
6666
If *C* is not generic, then <code>\<*typeParams*\></code> and <code>\<*typeArgs*\></code> are omitted. Otherwise <code>\<*typeParams*\></code> are exactly the same type parameters as those of the class declaration of *C* (including bounds), and <code>\<*typeArgs*></code> applies those type parameter variables directly as type arguments to *C*.
6767

accepted/future-releases/extension-types/feature-specification.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -432,7 +432,7 @@ A compile-time error occurs if the extension type declaration declares any
432432
instance variables, unless they are `external`.
433433

434434
*An external instance variable is just a convenient notation for an external
435-
getter and (if not `final`) an external setter. They are allowed.*
435+
getter and (if not `final`) an external setter, which are both allowed.*
436436

437437
The _name of the representation_ in an extension type declaration with a
438438
representation declaration of the form `(T id)` is the identifier `id`, and

0 commit comments

Comments
 (0)