[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:
Nicholas Shahan 2023-07-06 22:39:13 +00:00 committed by Commit Queue
parent a2cdf8e96d
commit 8515c4a428

View file

@ -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) =>