File tree Expand file tree Collapse file tree
kotlin-extractor/src/main/kotlin
ql/test/kotlin/library-tests/classes Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -99,7 +99,8 @@ open class KotlinFileExtractor(
9999 if (isExternalDeclaration(declaration)) {
100100 extractExternalClassLater(declaration)
101101 } else {
102- extractClassSource(declaration, true , true )
102+ val extractStaticInit = declaration.declarations.none { it is IrAnonymousInitializer }
103+ extractClassSource(declaration, true , extractStaticInit)
103104 }
104105 }
105106 is IrFunction -> {
Original file line number Diff line number Diff line change @@ -78,7 +78,7 @@ classes.kt:
7878# 29| 5: [BlockStmt] { ... }
7979# 29| 0: [ThisConstructorInvocationStmt] this(...)
8080# 34| 10: [Class] ClassSeven
81- # 35| 2 : [Constructor] ClassSeven
81+ # 35| 1 : [Constructor] ClassSeven
8282#-----| 4: (Parameters)
8383# 35| 0: [Parameter] i
8484# 35| 5: [BlockStmt] { ... }
@@ -96,12 +96,12 @@ classes.kt:
9696# 36| 2: [ExprStmt] <Expr>;
9797# 36| 0: [MethodAccess] f(...)
9898# 36| 0: [VarAccess] i
99- # 42| 3 : [Method] getX
99+ # 42| 2 : [Method] getX
100100# 42| 5: [BlockStmt] { ... }
101101# 42| 0: [ReturnStmt] return ...
102102# 42| 0: [VarAccess] this.x
103103# 42| -1: [ThisAccess] this
104- # 42| 3 : [FieldDeclaration] int x;
104+ # 42| 2 : [FieldDeclaration] int x;
105105# 42| -1: [TypeAccess] int
106106# 42| 0: [IntegerLiteral] 3
107107# 49| 11: [Class] Direction
You can’t perform that action at this time.
0 commit comments