Skip to content

[ddc] Incorrect defaulting of named arguments with certain names #56315

@rakudrama

Description

@rakudrama

The property lookup in the JavaScript object 'bag' of named arguments finds methods from Object.prototype.
For example

foo({valueOf = 1}) => print(valueOf);

main() {
  foo(2); // Prints `2`
  foo();  // Prints a JavaScript function, not `1`.
}

See test https://dart-review.googlesource.com/c/sdk/+/377360

Metadata

Metadata

Assignees

Labels

area-web-jsIssues related to JavaScript support for Dart Web, including DDC, dart2js, and JS interop.web-dev-compiler

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions