-
-
Notifications
You must be signed in to change notification settings - Fork 184
Closed
Labels
Description
__TS__DescriptorGet uses rawget, which ignores __index, therefore returning nil when trying to access fields or methods of base class
For example, in dota_ts_adapter:
setmetatable(BaseAbility.prototype, {
__index: CDOTA_Ability_Lua ?? C_DOTA_Ability_Lua,
});Then, extending BaseAbility and calling method on super
class SuperAbility extends BaseAbility {
GetBehavior() {
const res = super.GetBehavior();
// ...
}
}Produces the following lua code:
local res = __TS__DescriptorGet(self, BaseAbility.prototype, "GetBehavior")(self)Which causes attempt to call a nil value error in runtime
Reactions are currently unavailable