ympbyc / LittleSmallscript

JavaScript with Smalltalk's syntax

Home Page:http://ympbyc.github.io/LittleSmallscript/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

super

ympbyc opened this issue · comments

I want super

Current implementation causes the stack to overflow when inheritance level gets deeper than two.
We have to provide the pseudo variable super independent of the pseudo variable self.

Make __super a class variable.

Added special case in optimizastion.st to turn

ClassName super: #superMethod.
ClassName super: #superMethod arguments: #(1 2 3)

into

ClassName.__super.superMethod.call(_this);
ClassName.__super.superMethod.apply(_this, [1, 2, 3]);

Seems to be working well.