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
Define "obvious" types to include formal parameters
This CL changes the definition of what it takes for a expression to have
an "obvious" type such that formal parameters are also included. For
example `(int x) { int y = x; }` will be flagged by the lint
`omit_obvious_local_variable_types` because `x` is considered to have an
obvious type, so `y` shouldn't have a type annotation.
I consider this to be a bug fix.
Note that it is assumed that the declaration of the given formal
parameter justifies the assumption that it does in fact have an obvious
type; if this is not true then the recommended remedy will be to change
the declaration of the formal parameter (by adding a type annotation).
This is the same kind of treatment which is given to to local variables
(where we may add a type annotation, or ensure that it has an
initializing expression whose type is obvious).
Change-Id: Id38c4d7660eb478293671e2b9785f4108a3313de
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/434062
Reviewed-by: Brian Wilkerson <[email protected]>
Commit-Queue: Erik Ernst <[email protected]>
0 commit comments