playground:
https://typescripttolua.github.io/play/#code/FAYwNghgzlAEAKEBOBTAdgF1gb2LfsAsgIwAUAlDgL54GEBMA-BdcDaJDLAMIAWAlmAAmsFAA8M6IXESpMOWvhItcBNbCgBXAA4okAOmXlFsGmoYqTarboMNG+iiZpUgA
key input:
class Child extends Parent {
M2() {
super.M2?.()
}
}
incorrect output (this become Parent.prototype, it should be self)
function Child.prototype.M2(self)
local ____this_1
____this_1 = Parent.prototype
local ____opt_0 = ____this_1.M2
if ____opt_0 ~= nil then
____opt_0(____this_1)
end
end
expected output
function Child.prototype.M2(self)
local ____opt_0 = Parent.prototype.M2
if ____opt_0 ~= nil then
____opt_0(self)
end
end
playground:
https://typescripttolua.github.io/play/#code/FAYwNghgzlAEAKEBOBTAdgF1gb2LfsAsgIwAUAlDgL54GEBMA-BdcDaJDLAMIAWAlmAAmsFAA8M6IXESpMOWvhItcBNbCgBXAA4okAOmXlFsGmoYqTarboMNG+iiZpUgA
key input:
incorrect output (
thisbecomeParent.prototype, it should beself)expected output