Commit Graph

4 Commits

Author SHA1 Message Date
Dmitry Stefantsov 5af05598eb [cfe] Disallow non-nullable fields without initializers
Closes #40081.

Bug: http://dartbug.com/40081
Change-Id: I4032af18164af05034c2706cba8f62be39c636c4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/133994
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2020-02-03 13:32:45 +00:00
Dmitry Stefantsov c05e2f1177 [cfe] Report errors on missing default values of optional parameters
The CL also fixes a bug: the required modifier in parameters of local
functions and function expressions wasn't handled.

Closes #40085.

Bug: http://dartbug.com/40085
Change-Id: Ic75fca5870f567ddf2e19aa3a96f83e9117540ae
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/132280
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2020-01-23 15:51:37 +00:00
Dmitry Stefantsov c85979a280 [cfe] Implement the NNBD variation of the assignability property
Change-Id: I802e5668952f918919bd4fda4fd0102623a20ae7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/128544
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com>
2019-12-16 12:38:27 +00:00
Johnni Winther eae781c73e [cfe] Add Field.isLate, VariableDeclaration.isLate and VariableDeclaration.isRequired
Add support for the `late` modifier on fields and local variables in
CFE, and `required` on named parameters When using the option
--enable-experiment=non-nullable the `isLate` and `isRequired` flags will be set
accordingly on Field and VariableDeclaration nodes.

Closes #37686
Closes #37684

Change-Id: If37fc93defdabc5cc974f3f068f57752a665f4cb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/113036
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
2019-08-16 19:39:05 +00:00