Skip to content

Instantly share code, notes, and snippets.

@tomdale
Created November 27, 2011 06:39
Show Gist options
  • Save tomdale/1397099 to your computer and use it in GitHub Desktop.
Save tomdale/1397099 to your computer and use it in GitHub Desktop.
SC.Object.extend
name: SC.attr 'string', { option: 'foo' }
SC.Object.extend({
name: SC.attr('string')
}, {
option: 'foo'
});
SC.Object.extend({
name: SC.attr('string', { option: foo })
});
@TrevorBurnham
Copy link

What's more alarming is that

name: SC.attr 'string', { option: 'foo' }

is, by itself or in a class body, a parse error. The trouble is that unbraced object literals passed to functions are parsed differently than unbraced object literals elsewhere. There are several open issues related to this, and kinks will continue to be worked out for some time.

@TrevorBurnham
Copy link

I've posted an issue for this: jashkenas/coffeescript#1896

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