We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I found some problem/inconsistency when using Result[] objects. The following code:
var rc = Result[(int,int),void].ok((1,-2))
is sort of unusable. In particular, accessing rc.value[0] would not compile but
rc.value[0]
var rc = Result[void,(int,int)].err((1,-2))
works as expected (including access to rc.error[0].)
rc.error[0]
Did somebody come accross this problem or is it just me?
I could fix the behaviour of the fist example using an object instead of a tuple
type KVP = object key, data: int var rc = Result[KVP,void].ok(KVP(key: 1, data: -2))
See attached code file for some more examples.
result_tuple_problem.txt
The text was updated successfully, but these errors were encountered:
As of the current NI version 1.6.12, the following works now
var rc = Result[(int,int),void].ok((1,-2)) doAssert rc.value[0] == 1 doAssert rc.value[1] == -2
Sorry, something went wrong.
No branches or pull requests
I found some problem/inconsistency when using Result[] objects. The following code:
is sort of unusable. In particular, accessing
rc.value[0]
would not compile butworks as expected (including access to
rc.error[0]
.)Did somebody come accross this problem or is it just me?
I could fix the behaviour of the fist example using an object instead of a tuple
See attached code file for some more examples.
result_tuple_problem.txt
The text was updated successfully, but these errors were encountered: