@Js
abstract class BaseMain {
abstract Void foo()
Void main() { foo() }
}
@Js
class Main : BaseMain {
override Void foo() { echo("Hi") }
}
The error message: Uncaught TypeError: this.foo is not a function as result of WebUtil::jsMain
// find main
var qname = 'MainTest::Main';
var dot = qname.indexOf('.');
if (dot < 0) qname += '.main';
var main = fan.sys.Slot.findMethod(qname);
// invoke main
if (main.isStatic()) main.call();
else main.callOn(main.parent().make());
^----make an instance of 'BaseMain'
go4 Sun 20 Dec 2015
My code like this:
The error message:
Uncaught TypeError: this.foo is not a function
as result ofWebUtil::jsMain
andy Mon 21 Dec 2015
Ticket promoted to #2500 and assigned to andy