@@ -168,8 +168,7 @@ public interface Raise<in Error> {
168
168
*
169
169
* data class Config(val mode: Int, val role: String, val serviceType: ServiceType)
170
170
*
171
- * context(Raise<String>)
172
- * fun readConfig(): Config {
171
+ * fun Raise<String>.readConfig(): Config {
173
172
* val mode = ensureNotNull(readln().toIntOrNull()) {
174
173
* "Mode should be a valid integer"
175
174
* }
@@ -530,8 +529,7 @@ public inline fun <reified T : Throwable, A> catch(block: () -> A, catch: (t: T)
530
529
* object ContainsInvalidChars : CountryCodeError
531
530
* }
532
531
*
533
- * context(Raise<CountryCodeError>)
534
- * fun countryCode(rawCode: String): CountryCode {
532
+ * fun Raise<CountryCodeError>.countryCode(rawCode: String): CountryCode {
535
533
* ensure(rawCode.length == 2) { CountryCodeError.InvalidLength(rawCode.length) }
536
534
* ensure(rawCode.any { !it.isLetter() }) { CountryCodeError.ContainsInvalidChars }
537
535
* return CountryCode(rawCode)
@@ -600,8 +598,7 @@ public inline fun <Error> Raise<Error>.ensure(condition: Boolean, raise: () -> E
600
598
* object NullValue : NameError
601
599
* }
602
600
*
603
- * context(Raise<NameError>)
604
- * fun fullName(name: String?): FullName {
601
+ * fun Raise<NameError>.fullName(name: String?): FullName {
605
602
* val nonNullName = ensureNotNull(name) { NameError.NullValue }
606
603
* return FullName(nonNullName)
607
604
* }
0 commit comments