File tree Expand file tree Collapse file tree 3 files changed +14
-2
lines changed
kotlin-extractor/src/main/kotlin
test/kotlin/library-tests/modifiers Expand file tree Collapse file tree 3 files changed +14
-2
lines changed Original file line number Diff line number Diff line change @@ -1141,6 +1141,10 @@ open class KotlinFileExtractor(
1141
1141
}
1142
1142
1143
1143
extractVisibility(p, id, p.visibility)
1144
+
1145
+ if (p.isLateinit) {
1146
+ addModifiers(id, " lateinit" )
1147
+ }
1144
1148
}
1145
1149
}
1146
1150
}
@@ -1291,6 +1295,9 @@ open class KotlinFileExtractor(
1291
1295
if (! v.isVar) {
1292
1296
addModifiers(varId, " final" )
1293
1297
}
1298
+ if (v.isLateinit) {
1299
+ addModifiers(varId, " lateinit" )
1300
+ }
1294
1301
}
1295
1302
}
1296
1303
Original file line number Diff line number Diff line change @@ -67,10 +67,10 @@ abstract class Modifiable extends Element {
67
67
/** Holds if this element has an `inline` modifier. */
68
68
predicate isInline ( ) { this .hasModifier ( "inline" ) }
69
69
70
- /** Holds if this element has an `noinline` modifier. */
70
+ /** Holds if this element has a `noinline` modifier. */
71
71
predicate isNoinline ( ) { this .hasModifier ( "noinline" ) }
72
72
73
- /** Holds if this element has an `crossinline` modifier. */
73
+ /** Holds if this element has a `crossinline` modifier. */
74
74
predicate isCrossinline ( ) { this .hasModifier ( "crossinline" ) }
75
75
76
76
/** Holds if this element has a `suspend` modifier. */
@@ -93,4 +93,7 @@ abstract class Modifiable extends Element {
93
93
94
94
/** Holds if this element has a `strictfp` modifier. */
95
95
predicate isStrictfp ( ) { this .hasModifier ( "strictfp" ) }
96
+
97
+ /** Holds if this element has a `lateinit` modifier. */
98
+ predicate isLateinit ( ) { this .hasModifier ( "lateinit" ) }
96
99
}
Original file line number Diff line number Diff line change 49
49
| modifiers.kt:30:1:36:1 | LateInit | Class | public |
50
50
| modifiers.kt:30:8:36:1 | LateInit | Constructor | public |
51
51
| modifiers.kt:31:5:31:40 | test0 | Field | private |
52
+ | modifiers.kt:31:5:31:40 | test0 | Property | lateinit |
52
53
| modifiers.kt:31:5:31:40 | test0 | Property | private |
53
54
| modifiers.kt:31:22:31:40 | getTest0$private | Method | private |
54
55
| modifiers.kt:31:22:31:40 | setTest0$private | Method | private |
55
56
| modifiers.kt:33:5:35:5 | fn | Method | public |
57
+ | modifiers.kt:34:9:34:36 | LateInit test1 | LocalVariableDecl | lateinit |
You can’t perform that action at this time.
0 commit comments