Created
April 23, 2012 23:11
-
-
Save aseemk/2474440 to your computer and use it in GitHub Desktop.
Streamline 0.2.4 super/arguments/apply bugs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*** Generated by streamline 0.2.2 - DO NOT EDIT ***/ | |
var __rt=require('streamline/lib/callbacks/runtime').runtime(__filename),__func=__rt.__func,__cb=__rt.__cb,__propagate=__rt.__propagate,__trap=__rt.__trap,__future=__rt.__future,__setEF=__rt.__setEF,__g=__rt.__g; | |
var Animal; | |
module.exports = Animal = (function() { | |
Animal.name = "Animal"; | |
function Animal() { | |
}; | |
Animal.prototype.greet = function Animal_prototype_greet__1(_) { | |
var __frame = { | |
name: "Animal_prototype_greet__1", | |
line: 10 | |
}; | |
return __func(_, this, arguments, Animal_prototype_greet__1, 0, __frame, function __$Animal_prototype_greet__1() { | |
console.log("ANIMAL: about to greet..."); | |
return setTimeout(__cb(_, __frame, 2, 4, function __$Animal_prototype_greet__1() { | |
return _(null, console.log("ANIMAL: finished greeting")); | |
}), 1000); | |
}); | |
}; | |
return Animal; | |
})(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module.exports = class Animal | |
greet: (_) -> | |
console.log "ANIMAL: about to greet..." | |
setTimeout _, 1000 | |
console.log "ANIMAL: finished greeting" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Generated by CoffeeScript 1.3.1 | |
var Animal; | |
module.exports = Animal = (function() { | |
Animal.name = 'Animal'; | |
function Animal() {} | |
Animal.prototype.greet = function(_) { | |
console.log("ANIMAL: about to greet..."); | |
setTimeout(_, 1000); | |
return console.log("ANIMAL: finished greeting"); | |
}; | |
return Animal; | |
})(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*** Generated by streamline 0.2.2 - DO NOT EDIT ***/ | |
var __rt=require('streamline/lib/callbacks/runtime').runtime(__filename),__func=__rt.__func,__apply=__rt.__apply,__cb=__rt.__cb,__propagate=__rt.__propagate,__trap=__rt.__trap,__future=__rt.__future,__setEF=__rt.__setEF,__g=__rt.__g; | |
var Animal, Dog, __hasProp = { | |
}.hasOwnProperty, __extends = function(child, parent) { | |
for (var key in parent) { | |
if (__hasProp.call(parent, key)) { | |
child[key] = parent[key]; | |
}; | |
}; | |
function ctor() { | |
this.constructor = child; | |
}; | |
ctor.prototype = parent.prototype; | |
child.prototype = new ctor; | |
child.__super__ = parent.prototype; | |
return child; | |
}; | |
Animal = require("./animal_"); | |
module.exports = Dog = (function(_super) { | |
__extends(Dog, _super); | |
Dog.name = "Dog"; | |
function Dog() { | |
return Dog.__super__.constructor.apply(this, arguments); | |
}; | |
Dog.prototype.greet = function Dog_prototype_greet__1(_) { | |
var __this = this, __arguments = arguments; | |
var __frame = { | |
name: "Dog_prototype_greet__1", | |
line: 18 | |
}; | |
return __func(_, this, arguments, Dog_prototype_greet__1, 0, __frame, function __$Dog_prototype_greet__1() { | |
console.log("DOG: about to call super..."); | |
return __apply(__cb(_, __frame, 2, 4, function __$Dog_prototype_greet__1() { | |
console.log("DOG: finished calling super"); | |
console.log("DOG: about to greet..."); | |
return setTimeout(__cb(_, __frame, 5, 4, function __$Dog_prototype_greet__1() { | |
return _(null, console.log("DOG: finished greeting")); | |
}), 1000); | |
}), Dog.__super__.greet, __this, __arguments, 0); | |
}); | |
}; | |
return Dog; | |
})(Animal); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Animal = require './animal_' | |
module.exports = class Dog extends Animal | |
greet: (_) -> | |
console.log "DOG: about to call super..." | |
super | |
console.log "DOG: finished calling super" | |
console.log "DOG: about to greet..." | |
setTimeout _, 1000 | |
console.log "DOG: finished greeting" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Generated by CoffeeScript 1.3.1 | |
var Animal, Dog, | |
__hasProp = {}.hasOwnProperty, | |
__extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor; child.__super__ = parent.prototype; return child; }; | |
Animal = require('./animal_'); | |
module.exports = Dog = (function(_super) { | |
__extends(Dog, _super); | |
Dog.name = 'Dog'; | |
function Dog() { | |
return Dog.__super__.constructor.apply(this, arguments); | |
} | |
Dog.prototype.greet = function(_) { | |
console.log("DOG: about to call super..."); | |
Dog.__super__.greet.apply(this, arguments); | |
console.log("DOG: finished calling super"); | |
console.log("DOG: about to greet..."); | |
setTimeout(_, 1000); | |
return console.log("DOG: finished greeting"); | |
}; | |
return Dog; | |
})(Animal); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require('coffee-script'); | |
require('streamline'); | |
var Dog = require('./dog_') | |
var d = new Dog(); | |
d.greet(function (err) { | |
console.log('FINISHED: ' + (err || 'no error.')); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DOG: about to call super... | |
ANIMAL: about to greet... | |
ANIMAL: finished greeting | |
DOG: finished calling super | |
DOG: about to greet... | |
DOG: finished greeting | |
DOG: finished calling super | |
DOG: about to greet... | |
DOG: finished greeting | |
DOG: finished calling super | |
DOG: about to greet... | |
DOG: finished greeting | |
DOG: finished calling super | |
DOG: about to greet... | |
DOG: finished greeting | |
DOG: finished calling super | |
DOG: about to greet... | |
[these three lines keep repeating] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DOG: about to call super... | |
ANIMAL: about to greet... | |
ANIMAL: finished greeting | |
DOG: finished calling super | |
DOG: about to greet... | |
DOG: finished greeting | |
FINISHED: no error. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment