[Analysis] fix invalid implementation of getKtModuleOfTypeSafe

This commit is contained in:
Ilya Kirillov
2022-09-26 15:31:34 +02:00
parent 913bfc0838
commit b72dbb7819
@@ -37,4 +37,4 @@ public inline fun <reified M : KtModule> PsiElement.getKtModuleOfType(project: P
* @param project [Project] which contains current [PsiElement]. `PsiElement.project` may be a heavy operation as it includes PSI tree traversal. So, when a [Project] is already available, it is better to pass it explicitly
*/
public inline fun <reified M : KtModule> PsiElement.getKtModuleOfTypeSafe(project: Project = this.project): M? =
getKtModule(project) as M?
getKtModule(project) as? M