You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Feb 22, 2018. It is now read-only.
For the field type inference issue, we're seeing extra casts like:
Zone._current=dart.as(zone,_RootZone);
even though _current is declared in Dart as:
staticZone _current =_ROOT_ZONE;
It appears that the rhs expression type is incorrectly overriding the lhs declared type.
I've also seen this in 'casts in constant contexts' in checker test:
classA {
staticconstnum n =3.0;
staticconstint i =/*info:AssignmentCast*/n;
finalint fi;
constA(num a) :this.fi =/*info:DownCastImplicit*/a;
}
classBextendsA {
constB(Object a) :super(/*info:DownCastImplicit*/a);
}
voidfoo(Object o) {
var a =constA(/*info:DownCastImplicit*/o);
}
The i = n initializer fails with a static type error because it thinks n is double instead of num like it should be.
The text was updated successfully, but these errors were encountered:
From @vsmenon's comment:
I've also seen this in 'casts in constant contexts' in checker test:
The
i = n
initializer fails with a static type error because it thinksn
isdouble
instead ofnum
like it should be.The text was updated successfully, but these errors were encountered: