mirror of
https://github.com/openharmony/third_party_jsframework.git
synced 2026-07-18 12:35:31 -04:00
!771 monthly1018分支解决联合类型含void类型时自动mock代码编译失败问题
Merge pull request !771 from fupengfei/monthly_20221018
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user