Skip to content
New issue

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

[FEATURE] Error type to be falsey #705

Open
1 task done
Jason2605 opened this issue Nov 30, 2023 · 0 comments · May be fixed by #736
Open
1 task done

[FEATURE] Error type to be falsey #705

Jason2605 opened this issue Nov 30, 2023 · 0 comments · May be fixed by #736
Labels
feature request Discussion about a new feature

Comments

@Jason2605
Copy link
Member

Is there an existing issue for this?

  • I have searched the existing issues

Is your feature request related to a problem?

Currently this snippet will evaluate to true since we don't check Result types when determining a falsey value

if (Error("error")) {
    print("AAAA");
}

It's probably worth considering marking Error<> types as falsey, then things like .success() are no longer needed, shortening some of the checks (will probably keep it though to keep compatibility)

Describe the solution you'd like

No response

Describe alternatives you've considered

No response

Additional context

No response

@Jason2605 Jason2605 added the feature request Discussion about a new feature label Nov 30, 2023
@Jason2605 Jason2605 linked a pull request Feb 7, 2024 that will close this issue
5 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request Discussion about a new feature
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant