In dart web projects, shouldn't type and reference warnings be errors? -


in dart, when developing web application, if invoke method wrong number of arguments, editor shows warning message, javascript compilation runs successfully, , error raised runtime. case example if refer , unexistent variable, or pass method argument of wrong type.

i ask, if editor know things won't work, why compilation successful? why have types if not checked @ compile time? guess behaviour has reason, couldn't find explained anywhere.

there no compilation stage. see warning based on type. example:

this code have warning:

void main() {   var foo = "";   foo.baz();  } 

but 1 won't:

void main() {   var foo;   foo.baz();  } 

because code analyzer cant deduct type of foo


Comments

Popular posts from this blog

google api - Incomplete response from Gmail API threads.list -

Installing Android SQLite Asset Helper -

Qt Creator - Searching files with Locator including folder -