3 // add a member just so Cls is recognized as a class from the start
7 Cls.B = function(a, b) {
12 Cls.B.Sub = function() {
16 Cls.B.prototype.m1 = function(a) {
22 Cls.B.prototype.m2 = function(b) {
25 Cls.B.prototype.m3 = function(c) {
28 Cls.B.prototype.m4 = function(d) {
31 Cls.B.prototype.m5 = function(e) {
32 /* this should rather be written `Cls.B.Sub.prototype.dyn1 = this.m6`, but
33 * then parser then thinks it's a child of this very scope. it isn't really
34 * possible to fix this as the only reason it's actually not a child of the
35 * current scope is because it exists in the root scope but not in this one */
37 Sub.prototype.dyn1 = this.m4
39 Cls.B.prototype.m6 = function(f) {
48 Cls.C.prototype = Cls.C.prototype
55 var c = new Cls.B(1, 2);
56 var d = new Cls.B.Sub();