以下代码,在IDE中报错:
Only imported variables and local variables can be used in @Concurrent decorated functions. <ArkTSCheck\>
class BBB{
name = ""
}
@Concurrent
function aaa(): number {
new BBB().name
return 1
}
以下代码,在IDE中报错:
Only imported variables and local variables can be used in @Concurrent decorated functions. <ArkTSCheck\>
class BBB{
name = ""
}
@Concurrent
function aaa(): number {
new BBB().name
return 1
}
1 回答1k 阅读✓ 已解决
1 回答1.3k 阅读
1 回答1.1k 阅读
1 回答1.1k 阅读
1 回答1.1k 阅读
1 回答968 阅读
1 回答939 阅读
在arkts中需要分为两个文件进行编写
参考以下示例
222.ets:
111.ets: