Type test operator is
works unintended for class final
members
#35181
Labels
closed-as-intended
Closed as the reported issue is expected behavior
Problem
According to Language Tour, the combination of
if
statement andis
operator can omit omit type cast byas
operator inif
statement.But
final
ized class members cannot cast automatically.final
ized class members will not be exchanged for another instance, so its type will not change.I think it should be compiled successfully.
Environment
dart --version
)The text was updated successfully, but these errors were encountered: