Skip to content

Commit

Permalink
Merge pull request #466 from InsanusMokrassar/0.21.6
Browse files Browse the repository at this point in the history
0.21.6
  • Loading branch information
InsanusMokrassar authored Jul 26, 2024
2 parents 16b9702 + ad40110 commit 17d6377
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Changelog

## 0.21.6

* `KSP`:
* `Sealed`:
* Fixes in generation

## 0.21.5

* `KSP`:
Expand Down
4 changes: 2 additions & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,5 @@ crypto_js_version=4.1.1
# Project data

group=dev.inmo
version=0.21.5
android_code_version=264
version=0.21.6
android_code_version=265
3 changes: 2 additions & 1 deletion ksp/sealed/generator/src/main/kotlin/Processor.kt
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ class Processor(
private fun KSClassDeclaration.findSealedConnection(potentialSealedParent: KSClassDeclaration): Boolean {
val targetClassname = potentialSealedParent.qualifiedName ?.asString()
return superTypes.any {
targetClassname == ((it.resolve().declaration as? KSClassDeclaration) ?.qualifiedName ?.asString()) || (it is KSClassDeclaration && it.getSealedSubclasses().any() && it.findSealedConnection(potentialSealedParent))
val itAsDeclaration = it.resolve().declaration as? KSClassDeclaration ?: return@any false
targetClassname == (itAsDeclaration.qualifiedName ?.asString()) || (itAsDeclaration.getSealedSubclasses().any() && itAsDeclaration.findSealedConnection(potentialSealedParent))
}
}

Expand Down

0 comments on commit 17d6377

Please sign in to comment.