未验证 提交 2b165787 编写于 作者: O openharmony_ci 提交者: Gitee

!771 monthly1018分支解决联合类型含void类型时自动mock代码编译失败问题

Merge pull request !771 from fupengfei/monthly_20221018
...@@ -99,6 +99,9 @@ export function getReturnStatement(returnType: ReturnTypeEntity, sourceFile: Sou ...@@ -99,6 +99,9 @@ export function getReturnStatement(returnType: ReturnTypeEntity, sourceFile: Sou
break; break;
} }
} }
if (returnName.trimStart().trimEnd() === 'void') {
return ``;
}
if (getClassNameSet().has(returnName)) { if (getClassNameSet().has(returnName)) {
return `return new ${returnName}()`; return `return new ${returnName}()`;
} else { } else {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册