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
The type_annotate_public_apis lint causes this issue to be reported:
lint • Type annotate public APIs at lib/language_tour/classes/misc.dart:22:16 • type_annotate_public_apis
Being a static const, its type is fully determined at compile time from the initializer, so a type annotation would be redundant, and certainly should not be required -- as the lint message seems to suggest.
Of course, such a static const w/o an explicit type annotation can end up having type dynamic, which might not be desirable, but that is another issue addressed via the --no-implicit-dynamic flag IMHO.
Consider the following class member declaration:
The
type_annotate_public_apis
lint causes this issue to be reported:Being a
static const
, its type is fully determined at compile time from the initializer, so a type annotation would be redundant, and certainly should not be required -- as the lint message seems to suggest.Of course, such a static const w/o an explicit type annotation can end up having type
dynamic
, which might not be desirable, but that is another issue addressed via the--no-implicit-dynamic
flag IMHO.cc @munificent @kwalrath @kevmoo
The text was updated successfully, but these errors were encountered: