File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed
tests/konsist/src/test/kotlin/io/element/android/tests/konsist Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -82,7 +82,15 @@ class KonsistArchitectureTest {
8282 return @all if (type.startsWith(" @" ) || type.startsWith(" (" ) || type.startsWith(" suspend" )) {
8383 true
8484 } else {
85- val fullyQualifiedName = param.type.declaration.packagee?.fullyQualifiedName + " ." + type
85+ var typePackage = param.type.declaration.packagee?.name
86+ if (typePackage == type) {
87+ // Workaround, now that packagee.fullyQualifiedName is not available anymore
88+ // It seems that when the type in in the same package as the function,
89+ // the package is equal to the type (which is wrong).
90+ // So in this case, use the package of the function
91+ typePackage = it.packagee?.name
92+ }
93+ val fullyQualifiedName = " $typePackage .$type "
8694 fullyQualifiedName !in forbiddenInterfacesForComposableParameter
8795 }
8896 }
You can’t perform that action at this time.
0 commit comments