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

Type Inferance problems with property and operator #131

Closed
fdecampredon opened this issue Nov 25, 2014 · 2 comments
Closed

Type Inferance problems with property and operator #131

fdecampredon opened this issue Nov 25, 2014 · 2 comments

Comments

@fdecampredon
Copy link

function fn1(x) { return x* 4};
fn1('hi');

function fn2(x) { return x.length * 4; }
fn2({length: 'hi'}); // no error however the situation is exactly the same that for fn1
@avikchaudhuri
Copy link
Contributor

The length property is treated specially to always return a number. This special case should be removed.

@StyMaar
Copy link

StyMaar commented Dec 7, 2014

@avikchaudhuri I don't understand your answer. It looks more like a broader problem not especially linked to the length property, as described it in #174

commonlisp added a commit to commonlisp/flow that referenced this issue Jan 18, 2015
Enable type checker to correctly type non-standard length properties.
Fixes issue facebook#131.
commonlisp added a commit to commonlisp/flow that referenced this issue Jan 21, 2015
Enable type checker to correctly type non-standard length properties.
Fixes issue facebook#131.
commonlisp added a commit to commonlisp/flow that referenced this issue Jan 22, 2015
Enable type checker to correctly type non-standard length properties.
Fixes issue facebook#131.
@bhosmer bhosmer closed this as completed Mar 3, 2015
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

4 participants