results: fix non-void [] overload

This commit is contained in:
Jacek Sieka 2020-04-23 06:46:10 +02:00
parent df7f2e7ed5
commit 8065e36c5a
No known key found for this signature in database
GPG Key ID: A1B09461ABB656B8
2 changed files with 2 additions and 2 deletions

View File

@ -453,7 +453,7 @@ func get*[T, E](self: var Result[T, E]): var T {.inline.} =
assertOk(self)
self.v
template `[]`*[T, E](self: Result[T, E]): T =
template `[]`*[T: not void, E](self: Result[T, E]): T =
## Fetch value of result if set, or raise Defect
## Exception bridge mode: raise given Exception instead
mixin get