Define method context from a custom contract #31

Closed
TobiaszCudnik opened this Issue Mar 11, 2012 · 3 comments

Comments

Projects
None yet
2 participants

Define method context (this) from a custom contract. Below ways i've tried to use, but none worked.

TCustomContract = ? { a: Num }
foo :: (@{ TCustomContract }) -> Any
foo :: (@TCustomContract) -> Any
foo = ->
Owner

disnet commented Mar 12, 2012

Added grammar support so this should work now. It's failing on node at the moment but it works in Firefox. Might be an old V8 bug.

Owner

disnet commented Mar 12, 2012

Ah! Definitely a V8 bug, I ran into it before: https://github.com/disnet/contracts.coffee/blob/master/test/contracts.coffee#L125

Hopefully node 0.7 fixes that. Will test that out when I get a chance.

Thanks for the grammar, but indeed it's still broken on node 0.7.5 (ERROR: illegal access).

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