Skip to content

Instantly share code, notes, and snippets.

@StanAngeloff
Created February 27, 2010 21:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save StanAngeloff/316983 to your computer and use it in GitHub Desktop.
Save StanAngeloff/316983 to your computer and use it in GitHub Desktop.
prototype A
constructor: ->
say 1
prototype B extends A
constructor: ->
say 2
super()
var A, B, _a;
A = function A() {
return say(1);
};
B = function B() {
say(2);
return B.__superClass__.constructor.call(this);
};
_a = function(){};
_a.prototype = A.prototype;
B.__superClass__ = A.prototype;
B.prototype = new _a();
B.prototype.constructor = B;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment