Skip to content

Commit 66c6aad

Browse files
authored
Update example in Static access shorthand proposal (#4191)
1 parent 0b1f014 commit 66c6aad

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

working/3616 - enum value shorthand/proposal-simple-lrhn.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,10 @@ That means you can write things like the following (with the intended meaning as
5757
comments, specification to achieve that below):
5858

5959
```dart
60-
Endian littleEndian = .little; // -> Endian.little (enum value)
60+
// -> HttpClientResponseCompressionState.compressed (enum value)
61+
HttpClientResponseCompressionState state = .compressed;
62+
63+
Endian littleEndian = .little; // -> Endian.little (static constant)
6164
Endian hostEndian = .host; // -> Endian.host (getter)
6265
// -> Endian.little, Endian.big, Endian.host
6366
Endian endian = firstWord == 0xFEFF ? .little : firstWord = 0xFFFE ? .big : .host;
@@ -270,7 +273,7 @@ and <code>*T*.new\<*typeArgs*\></code> already are, whether used as instantiated
270273
tear-off or invoked.
271274
_(The grammar allows them, because `C.new` is a `<primary>` expression, but
272275
a `C.new`, or a `C.id` denoting a constructor, followed by type arguments is
273-
recognized and made an error to avoid it being interpreted as `(C.new)<int>`.)
276+
recognized and made an error to avoid it being interpreted as `(C.new)<int>`.)_
274277

275278
**Notice**: The invocation of a constructor is *not* using an instantiated type,
276279
it’s behaving as if the constructor was preceded by a *raw type*, which type

0 commit comments

Comments
 (0)