Re: minisphere 1.0.4
Reply #214 –
Big problem. I can't run Blockman in it because it has trouble parsing all the code files. I got it to stop spewing syntax errors due to my use of const, but now it's giving me a 'not callable' issue that I cannot resolve.
Basically the minimal use case looks like this:
function SuperClass() {
this.weight = 5;
}
function SubClass() {
SuperClass.call(this);
}
SubClass.prototype = new SuperClass(); // ERROR here.
var a = new SubClass();
Abort(a instanceof SuperClass);
The above works 100% in minisphere. Then why the error? In Blockman I use the above pattern on hundreds of files and at some point it starts saying not callable on a myriad of functions using this design pattern. This games runs just fine in Sphere 1.5 and SSFML, but it gives me not callable issues on what are seemingly normal function calls.
I do some tests and try to spout out some info:
Abort(FuncInQuestion); // FuncInQuestion() { /*ecma code*/ }
Abort(typeof FuncInQuestion); // function
Abort(FuncInQuestion()); // TypeError: not callable
This happens because the analyzer thought these functions were somehow set to not callable, when in fact they are. I'm not sure if it's a scoping thing either because if it were, the first two tests would fail since the function in question could not be found. So this is really weird indeed.