-
Notifications
You must be signed in to change notification settings - Fork 227
Closed
Labels
nnbdNNBD related issuesNNBD related issues
Description
There seem to be no static errors specified for the signature provided for main
, and the runtime semantics don't seem to make it clear that as a result the invocation needs to do a dynamic type check. In practice, the VM at least seems to do so.
This program:
void main(int x) {
x.isEven;
}
produces the following runtime error when run:
Unhandled exception:
type 'List<String>' is not a subtype of type 'int' of 'x'
#0 _startIsolate.<anonymous closure> (dart:isolate-patch/isolate_patch.dart:299:32)
#1 _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:168:12)
This seems like it needs clarification in the spec, and possibly tests.
Metadata
Metadata
Assignees
Labels
nnbdNNBD related issuesNNBD related issues