diff --git a/changelog.md b/changelog.md index 23b4416..6774ee5 100644 --- a/changelog.md +++ b/changelog.md @@ -5,5 +5,8 @@ ### Added - Added auto-completion & reference to entity properties in hasValue() method. +### Fixed +- Fixed entity type resolution for variables typed with "resolution-invalid" types (e.g. `IRepository` interface); closes #18 + ### Changed - The plugin internal continuous delivery system & checks reworked. diff --git a/src/main/kotlin/org/nextras/orm/intellij/utils/OrmUtils.kt b/src/main/kotlin/org/nextras/orm/intellij/utils/OrmUtils.kt index 68e8864..008e8cc 100644 --- a/src/main/kotlin/org/nextras/orm/intellij/utils/OrmUtils.kt +++ b/src/main/kotlin/org/nextras/orm/intellij/utils/OrmUtils.kt @@ -44,13 +44,13 @@ object OrmUtils { for (repositoryClass in repositories) { val entityNamesMethod = repositoryClass.findMethodByName("getEntityClassNames") ?: return emptyList() if (entityNamesMethod.lastChild !is GroupStatement) { - return emptyList() + continue } if ((entityNamesMethod.lastChild as GroupStatement).firstPsiChild !is PhpReturn) { - return emptyList() + continue } if ((entityNamesMethod.lastChild as GroupStatement).firstPsiChild!!.firstPsiChild !is ArrayCreationExpression) { - return emptyList() + continue } val arr = (entityNamesMethod.lastChild as GroupStatement).firstPsiChild!!.firstPsiChild as ArrayCreationExpression?