jsx/JSX — pull request #54 by mzp (2012-07-01 05:39:01+00:00)
Title: fix error handling for an argument

Following code crush a compiler(3d480fc84e59e7d61314f92d61dcde34ca30ac4c).

class Test {
function main() : void {
var key : variant = null;
var obj : variant = null;
obj[key];
}
}

--

fatal error while compiling statement at file /Users/mzp/foo.jsx, line 5

Error: Unrecognized arguments for CompileError: the argument of variant[] should be a string or a number
at [object Object]. (/Users/mzp/workspaces/JSX/src/util.js:269:10)
at new (/Users/mzp/workspaces/JSX/src/util.js:303:38)
at [object Object]._analyzeApplicationOnVariant (/Users/mzp/workspaces/JSX/src/expression.js:1378:24)
at [object Object].analyze (/Users/mzp/workspaces/JSX/src/expression.js:1343:16)
at [object Object]._analyzeExpr (/Users/mzp/workspaces/JSX/src/statement.js:72:16)
at [object Object].doAnalyze (/Users/mzp/workspaces/JSX/src/statement.js:184:8)
at [object Object].analyze (/Users/mzp/workspaces/JSX/src/statement.js:45:16)
at [object Object].analyze (/Users/mzp/workspaces/JSX/src/classdef.js:954:31)
at [object Object]._analyzeMemberFunctions (/Users/mzp/workspaces/JSX/src/classdef.js:499:12)
at [object Object].analyze (/Users/mzp/workspaces/JSX/src/classdef.js:351:8)