Skip to content

Commit

Permalink
[wildcard-variables] Add unnamed optional parameters and their defaul…
Browse files Browse the repository at this point in the history
…t values. (#3880)
  • Loading branch information
kallentu authored Jun 6, 2024
1 parent f62423f commit 3a30bb4
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions working/wildcards/feature-specification.md
Original file line number Diff line number Diff line change
Expand Up @@ -357,6 +357,16 @@ class B extends A {
}
```

### Unnamed optional parameters

```dart
int foo([int _]) => 3; // OK.
```

An optional unnamed parameter, that's not an initializing or super parameter,
is allowed to have no default value, even if its type is non-nullable. We
will stop producing a compile time error for this case.

### Extension types

An extension type declaration has a `<representationDeclaration>`
Expand Down

0 comments on commit 3a30bb4

Please sign in to comment.