Skip to content
This repository has been archived by the owner on Oct 5, 2021. It is now read-only.

Arrow functions with concise body not instrumented correctly #82

Closed
urish opened this issue Nov 25, 2018 · 0 comments
Closed

Arrow functions with concise body not instrumented correctly #82

urish opened this issue Nov 25, 2018 · 0 comments
Assignees
Labels
bug Something isn't working component:core

Comments

@urish
Copy link
Collaborator

urish commented Nov 25, 2018

For instance, a function that reads x => 5 will be transformed to x => { $_$twiz(/*...*/); 5 } , which returns undefined and not 5.

Failing integration test case:

it('should correctly transform arrow functions that return arrow functions', () => {
  const input = `(x=>y=>x+y)(10)(5)`;
  expect(typeWiz(input)).toBe(`((x: number)=>(y: number)=>x+y)(10)(5)`);
});
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working component:core
Projects
None yet
Development

No branches or pull requests

1 participant