Type inference should exploit "is" and "is!" semantics #32236
Labels
area-language
Dart language related items (some items might be better tracked at github.com/dart-lang/language).
type-enhancement
A request for a change that isn't a bug
Consider this implementation of equals excerpt from the code shown in this section of the Library Tour:
As of Dart 2-dev.26, the type of
other
at (*) is dynamic.Couldn't it be inferred as
Person
?Similar arguments can be given for an
if
condition that makes use ofis
.cc @kwalrath @stereotype441 @leafpetersen @eernstg
The text was updated successfully, but these errors were encountered: