Skip to content

[dart2js] Runtime error if function 'main' has one or more than two optional positional arguments #43584

@sgrekhov

Description

@sgrekhov

With recent change in NNBD specification it is allowed to have one optional positional parameter of main() or more than two optional positional arguments. So, the following is not an error

main([List<String> args = const []]) {
}
main([List<String> args = const [], var i, String s = ""]) {
}

But now, it is a runtime error on dart2js in both of the cases above

Metadata

Metadata

Assignees

No one assigned

    Labels

    NNBDIssues related to NNBD Releasearea-web-jsIssues related to JavaScript support for Dart Web, including DDC, dart2js, and JS interop.dart2js-kernelweb-dart2js

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions