@@ -92,34 +92,52 @@ interface ExtrasLazyProperty<Receiver : HasMutableExtras, T> : ExtrasProperty<T>
92
92
DEPRECATED APIs
93
93
*/
94
94
95
- @Deprecated(" Scheduled for removal in Kotlin 2.2" )
96
- @Suppress(" DEPRECATION" )
95
+ @Deprecated(
96
+ " Scheduled for removal in Kotlin 2.3" ,
97
+ level = DeprecationLevel .ERROR ,
98
+ )
99
+ @Suppress(" DEPRECATION_ERROR" )
97
100
val <T : Any > Extras .Key <T >.readProperty get() = extrasReadProperty(this )
98
101
99
- @Deprecated(" Scheduled for removal in Kotlin 2.2" )
100
- @Suppress(" DEPRECATION" )
102
+ @Deprecated(
103
+ " Scheduled for removal in Kotlin 2.3" ,
104
+ level = DeprecationLevel .ERROR ,
105
+ )
106
+ @Suppress(" DEPRECATION_ERROR" )
101
107
fun <T : Any > Extras.Key<T>.factoryProperty (factory : () -> T ) = extrasFactoryProperty(this , factory)
102
108
103
- @Deprecated(" Scheduled for removal in Kotlin 2.2" )
104
- @Suppress(" DEPRECATION" )
109
+ @Deprecated(
110
+ " Scheduled for removal in Kotlin 2.3" ,
111
+ level = DeprecationLevel .ERROR ,
112
+ )
113
+ @Suppress(" DEPRECATION_ERROR" )
105
114
fun <Receiver : HasMutableExtras , T : Any > Extras.Key<Optional<T>>.nullableLazyProperty (factory : Receiver .() -> T ? ) =
106
115
extrasNullableLazyProperty(this , factory)
107
116
108
- @Deprecated(" Scheduled for removal in Kotlin 2.2" )
109
- @Suppress(" DEPRECATION" )
117
+ @Deprecated(
118
+ " Scheduled for removal in Kotlin 2.3" ,
119
+ level = DeprecationLevel .ERROR ,
120
+ )
121
+ @Suppress(" DEPRECATION_ERROR" )
110
122
fun <T : Any > extrasReadProperty (key : Extras .Key <T >): ExtrasReadOnlyProperty <T > = object : ExtrasReadOnlyProperty <T > {
111
123
override val key: Extras .Key <T > = key
112
124
}
113
125
114
- @Deprecated(" Scheduled for removal in Kotlin 2.2" )
115
- @Suppress(" DEPRECATION" )
126
+ @Deprecated(
127
+ " Scheduled for removal in Kotlin 2.3" ,
128
+ level = DeprecationLevel .ERROR ,
129
+ )
130
+ @Suppress(" DEPRECATION_ERROR" )
116
131
fun <T : Any > extrasFactoryProperty (key : Extras .Key <T >, factory : () -> T ) = object : ExtrasFactoryProperty <T > {
117
132
override val key: Extras .Key <T > = key
118
133
override val factory: () -> T = factory
119
134
}
120
135
121
- @Deprecated(" Scheduled for removal in Kotlin 2.2" )
122
- @Suppress(" DEPRECATION" )
136
+ @Deprecated(
137
+ " Scheduled for removal in Kotlin 2.3" ,
138
+ level = DeprecationLevel .ERROR ,
139
+ )
140
+ @Suppress(" DEPRECATION_ERROR" )
123
141
fun <Receiver : HasMutableExtras , T : Any > extrasNullableLazyProperty (
124
142
key : Extras .Key <Optional <T >>, factory : Receiver .() -> T ? ,
125
143
): NullableExtrasLazyProperty <Receiver , T > =
@@ -128,24 +146,36 @@ fun <Receiver : HasMutableExtras, T : Any> extrasNullableLazyProperty(
128
146
override val factory: Receiver .() -> T ? = factory
129
147
}
130
148
131
- @Deprecated(" Scheduled for removal in Kotlin 2.2" )
132
- @Suppress(" DEPRECATION" , " UNUSED" )
149
+ @Deprecated(
150
+ " Scheduled for removal in Kotlin 2.3" ,
151
+ level = DeprecationLevel .ERROR ,
152
+ )
153
+ @Suppress(" DEPRECATION_ERROR" , " UNUSED" )
133
154
inline fun <reified T : Any > extrasReadProperty (name : String? = null) =
134
155
extrasReadProperty(extrasKeyOf<T >(name))
135
156
136
157
137
- @Deprecated(" Scheduled for removal in Kotlin 2.2" )
138
- @Suppress(" DEPRECATION" , " UNUSED" )
158
+ @Deprecated(
159
+ " Scheduled for removal in Kotlin 2.3" ,
160
+ level = DeprecationLevel .ERROR ,
161
+ )
162
+ @Suppress(" DEPRECATION_ERROR" , " UNUSED" )
139
163
inline fun <reified T : Any > extrasFactoryProperty (name : String? = null, noinline factory : () -> T ) =
140
164
extrasFactoryProperty(extrasKeyOf(name), factory)
141
165
142
- @Deprecated(" Scheduled for removal in Kotlin 2.2" )
143
- @Suppress(" DEPRECATION" , " DeprecatedCallableAddReplaceWith" )
166
+ @Deprecated(
167
+ " Scheduled for removal in Kotlin 2.3" ,
168
+ level = DeprecationLevel .ERROR ,
169
+ )
170
+ @Suppress(" DEPRECATION_ERROR" , " DeprecatedCallableAddReplaceWith" )
144
171
inline fun <Receiver : HasMutableExtras , reified T : Any > extrasNullableLazyProperty (
145
172
name : String? = null, noinline factory : Receiver .() -> T ? ,
146
173
) = extrasNullableLazyProperty(extrasKeyOf(name), factory)
147
174
148
- @Deprecated(" Scheduled for removal in Kotlin 2.2" )
175
+ @Deprecated(
176
+ " Scheduled for removal in Kotlin 2.3" ,
177
+ level = DeprecationLevel .ERROR ,
178
+ )
149
179
interface ExtrasReadOnlyProperty <T : Any > : ExtrasProperty <T >, ReadOnlyProperty <HasExtras , T ?> {
150
180
override fun getValue (thisRef : HasExtras , property : KProperty <* >): T ? {
151
181
return thisRef.extras[key]
@@ -157,7 +187,10 @@ interface ExtrasReadOnlyProperty<T : Any> : ExtrasProperty<T>, ReadOnlyProperty<
157
187
}
158
188
}
159
189
160
- @Deprecated(" Scheduled for removal in Kotlin 2.2" )
190
+ @Deprecated(
191
+ " Scheduled for removal in Kotlin 2.3" ,
192
+ level = DeprecationLevel .ERROR ,
193
+ )
161
194
interface ExtrasFactoryProperty <T : Any > : ExtrasProperty <T >, ReadWriteProperty <HasMutableExtras , T > {
162
195
val factory: () -> T
163
196
@@ -170,7 +203,10 @@ interface ExtrasFactoryProperty<T : Any> : ExtrasProperty<T>, ReadWriteProperty<
170
203
}
171
204
}
172
205
173
- @Deprecated(" Scheduled for removal in Kotlin 2.2" )
206
+ @Deprecated(
207
+ " Scheduled for removal in Kotlin 2.3" ,
208
+ level = DeprecationLevel .ERROR ,
209
+ )
174
210
interface NullableExtrasLazyProperty <Receiver : HasMutableExtras , T : Any > : ExtrasProperty <Optional <T >>, ReadOnlyProperty <Receiver , T ?> {
175
211
val factory: Receiver .() -> T ?
176
212
0 commit comments