mirror of
https://gitee.com/openharmony/third_party_jsframework
synced 2025-02-17 05:27:52 +00:00
!769 master分支解决联合类型含void类型时自动mock代码编译失败问题
Merge pull request !769 from fupengfei/master
This commit is contained in:
commit
6dd8a795eb
@ -99,6 +99,9 @@ export function getReturnStatement(returnType: ReturnTypeEntity, sourceFile: Sou
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (returnName.trimStart().trimEnd() === 'void') {
|
||||
return ``;
|
||||
}
|
||||
if (getClassNameSet().has(returnName)) {
|
||||
return `return new ${returnName}()`;
|
||||
} else {
|
||||
|
Loading…
x
Reference in New Issue
Block a user