mirror of
https://github.com/github/codeql.git
synced 2025-12-22 11:46:32 +01:00
Kotlin: Remove some redundant code
useClassSource already checks to see if it is given an anonymous object, and behaves accordingly.
This commit is contained in:
@@ -389,11 +389,7 @@ open class KotlinFileExtractor(
|
||||
with("class source", c) {
|
||||
DeclarationStackAdjuster(c).use {
|
||||
|
||||
val id = if (c.isAnonymousObject) {
|
||||
useAnonymousClass(c).javaResult.id.cast<DbClass>()
|
||||
} else {
|
||||
useClassSource(c)
|
||||
}
|
||||
val id = useClassSource(c)
|
||||
val pkg = c.packageFqName?.asString() ?: ""
|
||||
val cls = if (c.isAnonymousObject) "" else c.name.asString()
|
||||
val pkgId = extractPackage(pkg)
|
||||
|
||||
Reference in New Issue
Block a user