Skip to content

Commit 90c6830

Browse files
sstricklcommit-bot@chromium.org
authored andcommitted
[vm] Use AreValidArguments so that names are checked as well.
Cq-Include-Trybots: luci.dart.try:vm-kernel-precomp-linux-debug-x64-try Bug: #40813 Change-Id: I36e7150a4450be52e563df459eb47abb69d59281 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/154686 Reviewed-by: Alexander Aprelev <[email protected]> Commit-Queue: Tess Strickland <[email protected]>
1 parent 64deee1 commit 90c6830

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

runtime/vm/dart_entry.cc

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -215,8 +215,6 @@ ObjectPtr DartEntry::ResolveCallable(const Array& arguments,
215215
const ArgumentsDescriptor args_desc(arguments_descriptor);
216216
const intptr_t receiver_index = args_desc.FirstArgIndex();
217217
const intptr_t type_args_len = args_desc.TypeArgsLen();
218-
const intptr_t args_count = args_desc.Count();
219-
const intptr_t named_args_count = args_desc.NamedCount();
220218
const auto& getter_name = Symbols::GetCall();
221219

222220
auto& instance = Instance::Handle(zone);
@@ -228,8 +226,7 @@ ObjectPtr DartEntry::ResolveCallable(const Array& arguments,
228226
instance ^= arguments.At(receiver_index)) {
229227
// The instance is a callable, so check that its function is compatible.
230228
if (instance.IsCallable(&function)) {
231-
bool matches = function.AreValidArgumentCounts(type_args_len, args_count,
232-
named_args_count, nullptr);
229+
bool matches = function.AreValidArguments(args_desc, nullptr);
233230

234231
if (matches && type_args_len > 0 && function.IsClosureFunction()) {
235232
// Though the closure function is generic, the closure itself may

0 commit comments

Comments
 (0)