Fix check in isSameRootType. May fix KT-28626. Related to KT-27718
This commit is contained in:
@@ -14,7 +14,7 @@ fun isSameRootType(kotlinRoot: KotlinRootType, other: Any?): Boolean {
|
|||||||
val invokeLevel = 3
|
val invokeLevel = 3
|
||||||
val stack = Thread.currentThread().stackTrace
|
val stack = Thread.currentThread().stackTrace
|
||||||
if (stack.size > invokeLevel && "isTestSource" == stack[invokeLevel].methodName && "com.intellij.openapi.roots.impl.SourceFolderImpl" == stack[invokeLevel].className) {
|
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
|
return true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user