感谢提交Issue!关于Issue的交互操作,请访问OpenHarmony社区支持命令清单。如果有问题,请联系 [@xucheng46](https://gitcode.com/xucheng46) [@gavin1012_hw](https://gitcode.com/gavin1012_hw) [@trubachevilya](https://gitcode.com/trubachevilya) [@vpukhov](https://gitcode.com/vpukhov) [@chernykhsergey](https://gitcode.com/chernykhsergey) [@zhuoli](https://gitcode.com/zhuoli) 。如果需要调整订阅PR、Issue的变更状态,请访问链接。
Thanks for submitting the issue. For more commands, please visit OpenHarmony Command List. If you have any questions, please refer to committer gitcode for help. If you need to change the subscription of a Pull Request or Issue, please visit the link.


Current Status
Experimental PR is created. The PR convert the warning on field overriding to CTE. With these changes ninja tests does not show any errors. In OHOS CI the only one job is failed. In the log of failed job only one error message has been generated.
Right now looking for details of the detected overriding.


Current Status
Right now working on the field overriding case in the class PhotoEditorExtensionAbility (file: @ohos.app.ability.PhotoEditorExtensionAbility.ets from the repository "ability_ability_runtime"). Rough solution is committed and being tested with OHOS CI.


The following auxilary issues have been created to help with finding the problems in the codebase:
Issue to mark field overriding as CTE.
https://gitcode.com/openharmony/arkcompiler_ets_frontend/issues/9576
Issue using white list to spot field overriding cases:
https://gitcode.com/openharmony/arkcompiler_ets_frontend/issues/9698


Current Status
New strategy to commit the changes would be to commit in small bunches. For that the warning is supplied with "exclusion list". The exclusion list references to files where the warning should become CTE. And among these files the case of field overriding is fixed.
In the current step this strategy will be applied on two repositories: ability_ability_runtime and ability_form_fwk.


New technical issue is created to merge changes in ability_ability_runtime and ability_form_fwk repositories.
https://gitcode.com/openharmony/arkcompiler_ets_frontend/issues/9585
Part 1 -> Merged


One more technical issue is created. The goal of this issue is make necessary changes in the distributeddatamgr_udmf repository.
https://gitcode.com/openharmony/arkcompiler_ets_frontend/issues/9591
Combined with the next issue to be Part 2


Technical issue to make necessary changes in the arkui_ace_engine repository is created.
https://gitcode.com/openharmony/arkcompiler_ets_frontend/issues/9602
Part 2


Current Status
The repositories distributeddatamgr_udmf and arkui_ace_engine are fixed and on the way to be merged.
Currently looking for other problems in other repositories with field overriding.


Technical issue to make necessary changes in the interface_sdk-js repository is created.
https://gitcode.com/openharmony/arkcompiler_ets_frontend/issues/9633
Part 3


Current Status
The patch for repositories (planned Part 2 merge for this issue) is on hold because of new code merged into the master branch related to code generation in arkui_ace_engine repository. For now, in another task the generation script will be fixed. After that the changes in the patch would be reworked to meet new generation logic.
The patch for repository interface_sdk-js (planned Part 3 merge for this issue) is in progress. The main problem with the patch is the way how to get approve on the changes in the interface_sdk-js. Right now we are trying to setup local OHOS build to run the patch on local system and after that we can get approve on the changes.
To avoid to be stopped by the unfinished work we are trying to use whitelists to treat the override field warning as warning in known repositories and to treat them as errors in all other code base. In this way we can get list of problematic places which we can fix step by step.


感谢对OpenHarmony社区的支持与关注,欢迎反馈缺陷。
发生了什么问题?
Warning->CTE: cannot override because overriding type is not compatible with the base type.
example of incorrect code:
class A {
fee: int = 5
foo(): void { console.log("aaa")}
}
class B extends A {
fee: number = 10
faa(): void {console.log("bbb")}
}
Warning W52491: fee in B cannot override fee in A because overriding type is not compatible with the base type. [tmpy22e3_4d.ets:7:5]
Need to set CTE for internal sources first (use DPANDA_STRICT_MODE=true), then clean up code in subsystems in the next pr
期望行为是什么?
如何复现该缺陷
其他补充信息
版本或分支信息
[x] master
[ ] Release 6.1
[ ] Release 6.0
[ ] Release 5.1.0
[ ] Release 5.0.3
[ ] Release 4.1
[ ] Other