Skip to content

Strong mode should infer parameter types from default value expressions #25794

Closed
@stereotype441

Description

@stereotype441

Currently, strong mode does not infer the type of the parameter x in the code below:

void f({x: false}) {
  ...
}

It seems like it would be reasonable to do so, since it would be similar to the way it infers the type of variables from their initializer expressions.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2A bug or feature request we're likely to work onlegacy-area-analyzerUse area-devexp instead.type-enhancementA request for a change that isn't a bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions