unix now has an autoconf based make system. currently the new make system only makes parser related files, back end stuff to be added soon. mac and windows makesystems will be checked in next. parser.cpp has been factored into token.*, lexer.*, and parser.* utilities.cpp has been factored into formatter.*, exception.*, mem.*, strings.*,ds.h, stlcfg.h, and algo.h git-svn-id: svn://10.0.0.236/trunk@86568 18797224-902f-48f8-a5cc-f745e15eee43
16 lines
455 B
JavaScript
16 lines
455 B
JavaScript
|
|
load("verify.js");
|
|
|
|
class C {
|
|
var x:Integer = 3;
|
|
function m() {return x}
|
|
function n(x) {return x+4}
|
|
}
|
|
|
|
var c:C = new C;
|
|
verify( c.m(), 3 ); // returns 3
|
|
verify( c.n(7), 11 ); // returns 11
|
|
var f:Function = c.m; // f is a zero-argument function with this bound to c
|
|
verify( f(), 3 ); // returns 3
|
|
c.x = 8;
|
|
verify( f(), 8 ); // returns 8
|