Skip to content

Commit 8a5cb11

Browse files
committed
Kotlin: Remove some redundant code
useClassSource already checks to see if it is given an anonymous object, and behaves accordingly.
1 parent 07457b2 commit 8a5cb11

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

java/kotlin-extractor/src/main/kotlin/KotlinFileExtractor.kt

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -389,11 +389,7 @@ open class KotlinFileExtractor(
389389
with("class source", c) {
390390
DeclarationStackAdjuster(c).use {
391391

392-
val id = if (c.isAnonymousObject) {
393-
useAnonymousClass(c).javaResult.id.cast<DbClass>()
394-
} else {
395-
useClassSource(c)
396-
}
392+
val id = useClassSource(c)
397393
val pkg = c.packageFqName?.asString() ?: ""
398394
val cls = if (c.isAnonymousObject) "" else c.name.asString()
399395
val pkgId = extractPackage(pkg)

0 commit comments

Comments
 (0)