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

Fixes #1871, close implicit objects in implicit returns #3324

Merged
merged 1 commit into from
Jan 23, 2014

Conversation

xixixao
Copy link
Contributor

@xixixao xixixao commented Jan 23, 2014

Fixes namely #1871 (comment).

# coffee -bpe 'a: b if c'
if (c) {
  ({
    a: b
  });
}

@michaelficarra
Copy link
Collaborator

❤️

@@ -405,12 +422,6 @@ test "#1961, #1974, regression with compound assigning to an implicit object", -

eq obj.four, 4

test "#2207: Immediate implicit closes don't close implicit objects", ->
Copy link
Collaborator

Choose a reason for hiding this comment

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

I don't understand. Why did this one have to be removed?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That was a test for the old behavior, so I moved the code to the current test and modified it. The current PR is almost direct opposite of the functionality that this test used to test.

Copy link
Collaborator

Choose a reason for hiding this comment

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

No, not quite. There's a big difference between a: for b in c then b and a: b for b in c.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Very very good catch!

@xixixao
Copy link
Contributor Author

xixixao commented Jan 23, 2014

@michaelficarra Fixed, thanks for the catch.

@michaelficarra
Copy link
Collaborator

Perfect.

michaelficarra added a commit that referenced this pull request Jan 23, 2014
Fixes #1871, close implicit objects in implicit returns
@michaelficarra michaelficarra merged commit 5f31a3d into jashkenas:master Jan 23, 2014
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

Successfully merging this pull request may close these issues.

2 participants