continuation icon indicating copy to clipboard operation
continuation copied to clipboard

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

Open skerit opened this issue 11 years ago • 1 comments

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()

skerit avatar Jan 03 '14 09:01 skerit

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

BYVoid avatar Jan 03 '14 16:01 BYVoid