Skip to content

Commit 8515c4a

Browse files
nshahanCommit Queue
authored andcommitted
[ddc] Fix check for required named args in new type system
Issue: #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>
1 parent a2cdf8e commit 8515c4a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

sdk/lib/_internal/js_dev_runtime/private/ddc_runtime/operations.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -251,8 +251,8 @@ String? _argumentErrors(Object type, @notNull List actuals, namedActuals) {
251251
}
252252
}
253253
// Verify that all required named parameters are provided an argument.
254-
if (requiredCount > 0) {
255-
Iterable requiredNames = getOwnPropertyNames(requiredNamed);
254+
Iterable requiredNames = getOwnPropertyNames(requiredNamed);
255+
if (JS<int>('!', '#.length', requiredNames) > 0) {
256256
var missingRequired = namedActuals == null
257257
? requiredNames
258258
: requiredNames.where((name) =>

0 commit comments

Comments
 (0)