Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Spread operator on a function should not be allowed #3973

Closed
singpolyma-shopify opened this issue May 18, 2017 · 1 comment
Closed

Spread operator on a function should not be allowed #3973

singpolyma-shopify opened this issue May 18, 2017 · 1 comment

Comments

@singpolyma-shopify
Copy link

This code:

// @flow
const x = [];
const y : Array<{ hello: string }> = [...x.concat, { hello: "there" }];

Passes flow currently, however the result of ...x.concat is undefined which results in a value being assigned to y that violates the type.

@vkurchatkin
Copy link
Contributor

This is caused by #106

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants