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(
11411141 }
11421142
11431143 extractVisibility(p, id, p.visibility)
1144+
1145+ if (p.isLateinit) {
1146+ addModifiers(id, " lateinit" )
1147+ }
11441148 }
11451149 }
11461150 }
@@ -1291,6 +1295,9 @@ open class KotlinFileExtractor(
12911295 if (! v.isVar) {
12921296 addModifiers(varId, " final" )
12931297 }
1298+ if (v.isLateinit) {
1299+ addModifiers(varId, " lateinit" )
1300+ }
12941301 }
12951302 }
12961303
Original file line number Diff line number Diff line change @@ -67,10 +67,10 @@ abstract class Modifiable extends Element {
6767 /** Holds if this element has an `inline` modifier. */
6868 predicate isInline ( ) { this .hasModifier ( "inline" ) }
6969
70- /** Holds if this element has an `noinline` modifier. */
70+ /** Holds if this element has a `noinline` modifier. */
7171 predicate isNoinline ( ) { this .hasModifier ( "noinline" ) }
7272
73- /** Holds if this element has an `crossinline` modifier. */
73+ /** Holds if this element has a `crossinline` modifier. */
7474 predicate isCrossinline ( ) { this .hasModifier ( "crossinline" ) }
7575
7676 /** Holds if this element has a `suspend` modifier. */
@@ -93,4 +93,7 @@ abstract class Modifiable extends Element {
9393
9494 /** Holds if this element has a `strictfp` modifier. */
9595 predicate isStrictfp ( ) { this .hasModifier ( "strictfp" ) }
96+
97+ /** Holds if this element has a `lateinit` modifier. */
98+ predicate isLateinit ( ) { this .hasModifier ( "lateinit" ) }
9699}
Original file line number Diff line number Diff line change 4949| modifiers.kt:30:1:36:1 | LateInit | Class | public |
5050| modifiers.kt:30:8:36:1 | LateInit | Constructor | public |
5151| modifiers.kt:31:5:31:40 | test0 | Field | private |
52+ | modifiers.kt:31:5:31:40 | test0 | Property | lateinit |
5253| modifiers.kt:31:5:31:40 | test0 | Property | private |
5354| modifiers.kt:31:22:31:40 | getTest0$private | Method | private |
5455| modifiers.kt:31:22:31:40 | setTest0$private | Method | private |
5556| 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