Konsist: fix compilation issue and implement workaround.
This commit is contained in:
parent
2f5b69f222
commit
5f27c3ccc3
1 changed files with 9 additions and 1 deletions
|
|
@ -82,7 +82,15 @@ class KonsistArchitectureTest {
|
||||||
return@all if (type.startsWith("@") || type.startsWith("(") || type.startsWith("suspend")) {
|
return@all if (type.startsWith("@") || type.startsWith("(") || type.startsWith("suspend")) {
|
||||||
true
|
true
|
||||||
} else {
|
} else {
|
||||||
val fullyQualifiedName = param.type.declaration.packagee?.fullyQualifiedName + "." + type
|
var typePackage = param.type.declaration.packagee?.name
|
||||||
|
if (typePackage == type) {
|
||||||
|
// Workaround, now that packagee.fullyQualifiedName is not available anymore
|
||||||
|
// It seems that when the type in in the same package as the function,
|
||||||
|
// the package is equal to the type (which is wrong).
|
||||||
|
// So in this case, use the package of the function
|
||||||
|
typePackage = it.packagee?.name
|
||||||
|
}
|
||||||
|
val fullyQualifiedName = "$typePackage.$type"
|
||||||
fullyQualifiedName !in forbiddenInterfacesForComposableParameter
|
fullyQualifiedName !in forbiddenInterfacesForComposableParameter
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue