From 22b90864318919347ccd8b4fa50407acbb10af18 Mon Sep 17 00:00:00 2001 From: "pschwartau%netscape.com" Date: Tue, 14 Aug 2001 23:17:07 +0000 Subject: [PATCH] Corrected a mistake: any use of 'this' inside a class must be contained in a function. --- js2/tests/js/js2_0/Class/class-009.js | 41 +++++++++++++++++++++------ 1 file changed, 33 insertions(+), 8 deletions(-) diff --git a/js2/tests/js/js2_0/Class/class-009.js b/js2/tests/js/js2_0/Class/class-009.js index 4f025c37d2d..3fb7635136e 100644 --- a/js2/tests/js/js2_0/Class/class-009.js +++ b/js2/tests/js/js2_0/Class/class-009.js @@ -43,45 +43,70 @@ var expectedvalues = []; */ class A { - function m(){} + function m() + { + } } class AA extends A { - var M = m; + var M:Function = m; } class B { - function m(){} + function m() + { + } } class BB extends B { - var M = this.m; + var M:Function; + + constructor function BB() + { + M = this.m; + } } class C { - function m(){return 'Output defined in class C method "m"';} + function m() + { + return 'Output defined in class C method "m"'; + } } class CC extends C { - var M = m; + var M:Function; + + constructor function CC() + { + M = this.m; + } } class D { - function m(){return 'Output defined in class D method "m"';} + function m() + { + return 'Output defined in class D method "m"'; + } } class DD extends D { - var M = this.m; + var M:Function; + + constructor function DD() + { + M = this.m; + } }