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

Generators not returning last expression #568

Closed
naturalethic opened this issue Oct 1, 2014 · 5 comments
Closed

Generators not returning last expression #568

naturalethic opened this issue Oct 1, 2014 · 5 comments

Comments

@naturalethic
Copy link

(I am using a merge of the current master/generators heads)

joshua@tau olio § cat test.ls
->
 'foo'
->*
  'foo'
joshua@tau olio § lsc -cp test.ls
// Generated by LiveScript 1.2.0
(function(){
  (function(){
    return 'foo';
  });
  (function*(){
    'foo';
  });
}).call(this);
@vendethiel
Copy link
Contributor

It's been decided that generators should be hushed by default

@naturalethic
Copy link
Author

Can you link me to that discussion?

@vendethiel
Copy link
Contributor

Ah, yes, sorry -- it's just on the PR discussion : #462 (comment)

@naturalethic
Copy link
Author

What is the rationale for hushing generators? And by 'default', is there a switch to reverse this behavior?

@vendethiel
Copy link
Contributor

Use an explicit return

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

No branches or pull requests

2 participants