Skip to content

Commit

Permalink
[unity]是否要对this boxing的判断加上扩展函数的处理
Browse files Browse the repository at this point in the history
  • Loading branch information
chexiongsheng committed Jan 14, 2025
1 parent b2e77e1 commit 36eecc6
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -2524,7 +2524,7 @@ static bool RegisterType(Il2CppClass* klass)
}
std::vector<puerts::WrapData*> OverloadDatas;
OverloadDatas.push_back(CreateOverloadData(method, isExtensionMethod));
bool needBoxing = method->klass == il2cpp_defaults.object_class; // TODO: 处理扩展函数
bool needBoxing = (isExtensionMethod ? GetParameterType(method, 0) : method->klass) == il2cpp_defaults.object_class;
classInfo->Methods.push_back({ std::string(name), isStatic, isGetter, isSetter, needBoxing, std::move(OverloadDatas) });
return true;
};
Expand Down

0 comments on commit 36eecc6

Please sign in to comment.