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

cont() and obtain() do not work when instantiating a class #23

Open
skerit opened this issue Jan 3, 2014 · 1 comment
Open

cont() and obtain() do not work when instantiating a class #23

skerit opened this issue Jan 3, 2014 · 1 comment

Comments

@skerit
Copy link

skerit commented Jan 3, 2014

The code in this function:

function t() {
    var csvPath = '/tmp/contacts.csv';
        parser  = new ContactDocParser(csvPath, cont());
}

gets compiled to

function t() {
    var csvPath = '/tmp/contacts.csv';
        parser  = new ContactDocParser(csvPath, cont());
}
/* Generated by Continuation.js v0.1.4 */

It just ignores it.
When I remove the new statement, it does replace the cont()

@BYVoid
Copy link
Owner

BYVoid commented Jan 3, 2014

Sorry but I do not think this makes sense because it is seldom seen that a callback function is pass to a constructor of object in JavaScript. Could you tell me why this syntax is needed?

Thank you

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