Skip to content

upwards inference for block bodied lambda returns #25487

Closed
@jmesserly

Description

@jmesserly

From @leafpetersen

A minor annoyance that comes up now and then is that we don't do upwards inference to infer the return type of block-bodied closure literals. I don't think doing so would be too difficult - we could just keep track of the LUB of the static type of all of the returned values when we visit a function body.

Metadata

Metadata

Assignees

Labels

P1A high priority bug; for example, a single project is unusable or has many test failureslegacy-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