已关闭
Fix function types and lambda exp with receiver #10491
Fouckttt创建于 4月19日关闭于 6月22日
Fix function types and lambda exp with receiver #10491
已关闭
当前Pull Request已关闭, 关闭人@Fouckttt
4月19日 关联了issue:Fix unexpected CTEs and crashes on function types and lambda expressions with receiver
4月19日 关联了issue:Fix unexpected CTEs and crashes on function types and lambda expressions with receiver
4月19日 添加了label:waiting_on_author
openharmony_ci
4月19日 评论:
4月19日 评论:
感谢提交 Pull Requests!如果您提交的PR已经开发完毕,请评论 "start build" 触发门禁,更多交互操作,请访问OpenHarmony社区支持命令清单。如果需要调整订阅PR、Issue的变更状态,请访问订阅链接。
Thanks for submitting the pull request. If your Pull Request has already been developed, you can leave a "start build" comment to trigger the gated system. For more commands, please visit OpenHarmony Command List. If you need to change the subscription of a Pull Request or Issue, please visit the link.


4月19日 添加了label:dco检查成功
Fouckttt
4月19日 评论:
4月19日 评论:
start build


此处折叠了153条消息 查看更多
openharmony_dcp
6月5日 评论:
6月5日 评论:
您的PR超过一个月未合入,已经被自动关闭,如有需要您可以重新提交代码进行贡献。


openharmony_dcp
6月6日 评论:
6月6日 评论:
您的PR超过一个月未合入,已经被自动关闭,如有需要您可以重新提交代码进行贡献。


openharmony_dcp
6月7日 评论:
6月7日 评论:
您的PR超过一个月未合入,已经被自动关闭,如有需要您可以重新提交代码进行贡献。


openharmony_dcp
6月8日 评论:
6月8日 评论:
您的PR超过一个月未合入,已经被自动关闭,如有需要您可以重新提交代码进行贡献。


6月22日 关闭了 pull request
关联的Issue
https://gitcode.com/openharmony/arkcompiler_ets_frontend/issues/9819
提交类型
需求背景/Description
Receiver-based function types and lambda expressions were not handled consistently across checker and lowering. This caused several incorrect behaviors, including unexpected compiler crashes, wrong call-shape diagnostics, and incorrect member
resolution for this inside receiver lambdas. Affected scenarios included local receiver functions, synthetic lambda bodies, interface properties of type (this: T) => R, and cases where a class method and a same-name receiver function were both
visible.
问题现象&&分析/Reason
This fix stabilizes receiver-function handling in both checker and lowering:
Binds explicit receiver this consistently in checker, including nested arrow/lambda contexts.
Re-resolves extension-style calls after desugaring a.foo(...) to foo(a, ...), and avoids self-referential lookup from the current declarator.
Lowers synthetic receiver-lambda bodies directly to final invoke* form instead of relying on reset/re-check of generated bodies.
Uses a dedicated ordinary parameter for receiver-lambda bridge methods so lambda-object this and receiver this are no longer conflated.
Treats interface-property-backed callables as field-like during call resolution, so expressions such as i.f(a) are checked as ordinary function-value calls instead of extension-method calls.
Preserves real instance member priority for this.f() / a.f() over same-name receiver-function candidates when a class member already exists.
This fix stabilizes receiver-function handling in both checker and lowering:
Binds explicit receiver this consistently in checker, including nested arrow/lambda contexts.
Re-resolves extension-style calls after desugaring a.foo(...) to foo(a, ...), and avoids self-referential lookup from the current declarator.
Lowers synthetic receiver-lambda bodies directly to final invoke* form instead of relying on reset/re-check of generated bodies.
Uses a dedicated ordinary parameter for receiver-lambda bridge methods so lambda-object this and receiver this are no longer conflated.
Treats interface-property-backed callables as field-like during call resolution, so expressions such as i.f(a) are checked as ordinary function-value calls instead of extension-method calls.
Preserves real instance member priority for this.f() / a.f() over same-name receiver-function candidates when a class member already exists.
修改方案/Scheme
This fix stabilizes receiver-function handling in both checker and lowering:
Binds explicit receiver this consistently in checker, including nested arrow/lambda contexts.
Re-resolves extension-style calls after desugaring a.foo(...) to foo(a, ...), and avoids self-referential lookup from the current declarator.
Lowers synthetic receiver-lambda bodies directly to final invoke* form instead of relying on reset/re-check of generated bodies.
Uses a dedicated ordinary parameter for receiver-lambda bridge methods so lambda-object this and receiver this are no longer conflated.
Treats interface-property-backed callables as field-like during call resolution, so expressions such as i.f(a) are checked as ordinary function-value calls instead of extension-method calls.
Preserves real instance member priority for this.f() / a.f() over same-name receiver-function candidates when a class member already exists.****
测试结果(测试截图直接贴在对应测试项,主干已知问题需明确引入pr/责任人)
功能测试(除仅涉及文本外必测项)wiki
混淆测试(涉及arkguard改动时必测项)wiki
单元测试
Compiler测试套
TSC extra测试套
Test262测试套
Benchmark测试
应用自动化测试套
是否创建全局变量,若创建全局变量,是否有清空操作
兼容性测试(指令生成、文件格式修改时)
小版本兼容性测试
大版本兼容性测试
es2abc版本兼容性测试
说明:如PR涉及版本控制用例的变更,需同步检查修改对其他分支的影响,并确认是否要同步受影响的分支
是否涉及词法环境修改
说明:如PR涉及词法环境修改,需验证对应热重载场景是否兼容
性能测试 (新增语法检查等场景)
指令/abc格式修改自检,需联系下方邮箱,同步至相关领域
重要:涉及runtime_core仓abc2program、libpandafile、isa目录下的修改,必须提供一个编译helloworld项目的hap包给对应领域,并联系下方邮箱
Email: wutao185@huawei.com
是否已执行L0用例
是否已执行L0用例
Change-Id: I98f45de7775f015258ab89605387428d254d4bf6