Skip to content

[Master] fix 14043 collect return type from return statement in generator function#14235

Merged
yuit merged 6 commits into
masterfrom
master-fix14043
Mar 21, 2017
Merged

[Master] fix 14043 collect return type from return statement in generator function#14235
yuit merged 6 commits into
masterfrom
master-fix14043

Conversation

@yuit
Copy link
Copy Markdown
Contributor

@yuit yuit commented Feb 22, 2017

Fix #14043

Comment thread src/compiler/checker.ts Outdated
}
else {
let types: Type[];
let yieldTypes: Type[];
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit. i would leave the outside be types. inside if (functionFlags & FunctionFlags.Generator) i would just say types = concatenate(checkAndAggregateYieldOperandTypes(func, contextualMapper), checkAndAggregateReturnExpressionTypes(func, contextualMapper)); then the keep the rest of the flow the way it was

Kanchalai Tanglertsampan added 3 commits March 21, 2017 08:07
@yuit
Copy link
Copy Markdown
Contributor Author

yuit commented Mar 21, 2017

🔔 @mhegazy Update

@yuit yuit merged commit 46587c8 into master Mar 21, 2017
@yuit yuit deleted the master-fix14043 branch March 21, 2017 18:06
@microsoft microsoft locked and limited conversation to collaborators Jun 19, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants