Commit Graph

4 Commits

Author SHA1 Message Date
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 89a7dfb10e [cfe] Add more tests for compile-time errors related to Null Safety
Bug: http://dartbug.com/40054
Change-Id: Idcfaf9ef61d023f6e88507447459f21b6b324a3c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/131079
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2020-01-14 09:02:25 +00:00
Dmitry Stefantsov c656a0596e [cfe] Synthesize null initializer for required named parameters
The initializer is required for weak mode and won't affect the strong
mode.

Change-Id: I719fad1ee73e4e7b01c6608f931c37d038db01b8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/130700
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com>
2020-01-10 09:02:27 +00:00
Dmitry Stefantsov 0081dfc706 [cfe] Report error on required named parameters having default values
Bug: http://dartbug.com/39660
Change-Id: I0230d5b9f0448964ba9ad83a7adf46acfee9edcf
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/130372
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com>
2020-01-08 09:17:09 +00:00