mirror of
https://github.com/github/codeql.git
synced 2025-12-21 19:26:31 +01:00
Add test case for local variable in anonymous init
Also fix another instance of the same issue in extractLocalTypeDeclStmt
This commit is contained in:
committed by
Ian Lynagh
parent
1926bef050
commit
f8ad93a530
@@ -328,8 +328,9 @@ open class KotlinFileExtractor(
|
||||
}
|
||||
|
||||
private fun extractLocalTypeDeclStmt(c: IrClass, callable: Label<out DbCallable>, parent: Label<out DbStmtparent>, idx: Int) {
|
||||
val extractStaticInit = c.declarations.none { it is IrAnonymousInitializer }
|
||||
@Suppress("UNCHECKED_CAST")
|
||||
val id = extractClassSource(c, true, true) as Label<out DbClass>
|
||||
val id = extractClassSource(c, true, extractStaticInit) as Label<out DbClass>
|
||||
extractLocalTypeDeclStmt(id, c, callable, parent, idx)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user