mirror of
https://github.com/dart-lang/sdk
synced 2024-10-06 14:49:43 +00:00
[ddc] Fix check for required named args in new type system
Issue: https://github.com/dart-lang/sdk/issues/48585 Change-Id: I119c0d649461ddfd3879f75ef232ee8010ebf787 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/312203 Commit-Queue: Nicholas Shahan <nshahan@google.com> Reviewed-by: Mark Zhou <markzipan@google.com>
This commit is contained in:
parent
a2cdf8e96d
commit
8515c4a428
|
@ -251,8 +251,8 @@ String? _argumentErrors(Object type, @notNull List actuals, namedActuals) {
|
|||
}
|
||||
}
|
||||
// Verify that all required named parameters are provided an argument.
|
||||
if (requiredCount > 0) {
|
||||
Iterable requiredNames = getOwnPropertyNames(requiredNamed);
|
||||
Iterable requiredNames = getOwnPropertyNames(requiredNamed);
|
||||
if (JS<int>('!', '#.length', requiredNames) > 0) {
|
||||
var missingRequired = namedActuals == null
|
||||
? requiredNames
|
||||
: requiredNames.where((name) =>
|
||||
|
|
Loading…
Reference in a new issue