Files
sdk/pkg/dev_compiler/lib
Nicholas Shahan 6574ac912b [ddc] Fix test for the presence of named arguments
Use `Object.hasOwnProperty()` to test for the presence of named
arguments when the argument name matches a property from the
native JavaScript Object prototype. This is slower but more
accurate because it does not find any properties up the prototype
chain.

Previously, named arguments could falsely be detected as passed if
the name matched one of the properties on the native JavaScript
Object and an incorrect value would be retrieved from the named
argument packet.

This change also deletes the `@undefined` annotation because it
was only used in places that were not read by the compiler and
only read by the compiler in places it wasn't used. Essentially
dead code.

Fixes: https://github.com/dart-lang/sdk/issues/56315
Change-Id: Iedeacb1e7d61234fc63605d6df05da977c9a456e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/377721
Reviewed-by: Stephen Adams <sra@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
2024-07-26 04:50:30 +00:00
..