Skip to content

No error if the first argument of 'main' is not supertype of 'List<String>' #43552

@sgrekhov

Description

@sgrekhov

With the recent change in NNBD specification

Let L be a library that exports a declaration D named main. ... It is a compile-time error if D declares at least one positional parameter, and the first positional parameter has a type which is not a supertype of List< String >.

In fact, there is no error in analyzer and runtime error in VM

main(String args) {}

There must be a compile error in both analyzer and CFE
Dart SDK version: 2.10.0-110.0.dev (dev) (Wed Sep 9 17:51:43 2020 -0700) on "windows_x64"

Metadata

Metadata

Assignees

No one assigned

    Labels

    EpicNNBDIssues related to NNBD Releasearea-metaCross-cutting, high-level issues (for tracking many other implementation issues, ...).

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions