Corrected a mistake: any use of 'this' inside a class must be contained in a function.

This commit is contained in:
pschwartau%netscape.com 2001-08-14 23:17:07 +00:00
Родитель f1d134c609
Коммит 22b9086431
1 изменённых файлов: 33 добавлений и 8 удалений

Просмотреть файл

@ -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;
}
}