Closed
Description
This issue was originally filed by [email protected]
The spes in the section 11.3 says: "A variable declaration statement var id; or var id = e; introduces a new variable named id with static type Dynamic into the innermost enclosing scope.".
This means there should not be any static warnings in this test:
func(int p) {}
main() {
var param = true;
func(param);
}
But Dartc, r7976, produces a static warning: "bool is not assignable to int".
Changing code to
func(int p) {}
main() {
var param;
param = true;
func(param);
}
solves this problem.