Files
kotlin-fork/compiler/testData/codegen/box
Alexander Udalov 43413fcc44 Move lateinit assertion for companion property to companion object
Previously, for a property named `x` in the companion object of a class
named `Foo`, we generated:
- `Foo.access$getX$cp`, consisting of `GETFIELD Foo.x` and lateinit
  assertion
- `Foo.Companion.getX`, consisting of `INVOKEVIRTUAL Foo.access$getX$cp`

Now, we generate:
- `Foo.access$getX$cp`, consisting of `GETFIELD Foo.x`
- `Foo.Companion.getX`, consisting of `INVOKEVIRTUAL Foo.access$getX$cp`
  and lateinit assertion

The reason is that this way we can avoid generating another accessor and
reuse `Foo.access$getX$cp` in case `isInitialized` is called on a
lateinit property from companion.

For private properties, getX is not generated, but instead the assertion
is generated on each access to the field (which can be improved, see
KT-28331). The same happens for access to non-private properties from
inside the same context where they're declared.

 #KT-21862 In Progress
2018-12-13 14:12:33 +01:00
..
2018-10-22 16:32:55 +02:00
2018-08-28 13:48:44 +03:00
2018-12-07 17:58:20 +03:00
2018-09-18 14:36:20 +03:00
2018-10-22 16:32:55 +02:00
2018-11-01 16:51:38 +03:00
2018-10-10 17:27:37 +03:00
2018-11-01 16:51:38 +03:00
2018-10-22 16:32:55 +02:00
2018-10-15 00:03:45 +03:00
2018-07-10 13:34:19 +03:00
2018-08-01 12:29:24 +02:00
2018-08-09 14:22:50 +03:00
2018-08-09 14:22:50 +03:00
2018-11-01 16:51:38 +03:00
2018-10-15 00:03:45 +03:00
2018-09-18 14:36:20 +03:00
2018-09-11 12:34:09 +03:00
2018-09-18 14:36:20 +03:00
2018-07-10 13:34:19 +03:00
2018-10-25 15:49:21 +03:00
2018-10-22 16:32:55 +02:00
2018-10-22 16:32:55 +02:00
2018-10-22 16:32:55 +02:00
2018-08-01 12:29:24 +02:00
2018-08-09 14:22:50 +03:00
2018-09-18 14:36:20 +03:00
2018-10-09 15:33:04 +03:00
2018-09-18 14:36:20 +03:00
2018-10-22 16:32:55 +02:00
2018-10-15 00:03:45 +03:00
2018-10-15 00:03:45 +03:00
2018-09-18 14:36:20 +03:00
2018-09-18 14:36:20 +03:00
2018-10-22 16:32:55 +02:00
2018-06-14 19:54:30 +03:00
2018-08-02 15:51:16 +02:00
2018-10-22 16:32:55 +02:00
2018-08-09 20:55:50 +03:00
2018-10-15 00:03:45 +03:00
2018-06-28 12:26:41 +02:00
2018-09-18 14:36:20 +03:00
2018-06-21 13:27:17 +03:00
2018-10-25 15:48:42 +03:00
2018-10-10 17:27:37 +03:00
2018-08-15 10:26:28 +03:00
2018-10-25 09:12:26 +02:00