Fix check in isSameRootType. May fix KT-28626. Related to KT-27718

This commit is contained in:
Mikhail Glukhikh
2018-12-07 18:52:20 +03:00
parent 6c4f255393
commit 79537a5fdb
@@ -14,7 +14,7 @@ fun isSameRootType(kotlinRoot: KotlinRootType, other: Any?): Boolean {
val invokeLevel = 3
val stack = Thread.currentThread().stackTrace
if (stack.size > invokeLevel && "isTestSource" == stack[invokeLevel].methodName && "com.intellij.openapi.roots.impl.SourceFolderImpl" == stack[invokeLevel].className) {
if (JavaResourceRootType.TEST_RESOURCE == other) {
if (JavaResourceRootType.TEST_RESOURCE == other || JavaSourceRootType.TEST_SOURCE == other) {
return true
}
}