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

Union checks interfering with each other #1456

Open
ismailkarsli opened this issue Jan 9, 2025 · 0 comments
Open

Union checks interfering with each other #1456

ismailkarsli opened this issue Jan 9, 2025 · 0 comments

Comments

@ismailkarsli
Copy link

Bug Report

📝 Summary

As can be seen from the playground, first union type can affect other ones and fails falsely. The function in line 15:

const _iu0 = (input) =>
  (() => {
    if (undefined !== input.warnings) return _io0(input);
    else if (undefined !== input.errors) return _io1(input);
    else return false;
  })();

is the problem I guess. How about this?

const _iu0 = (input) =>
  (() => {
    return (_io0(input) || _io1(input) || return false);
  })();

⏯ Playground Link

https://typia.io/playground/?script=JYWwDg9gTgLgBDAnmYBDOAzKERwERIqp4DcAUGYQKZwBKVAzpAHYM0C8ZccAPnAN5ducAO6oozYMwDmDAFxwA2gSoAPGHgC65bgF8hfQcLhUo2KPKUr1WnXF3kyAeidwARhBgALOBAwIvRhoAN1QAG2AAEzhUAGNY6EipaQQIBGRGX39vGgBXSQhmMgTWeAg3ACsARjh2ARMzaEtFTQAaUXFJGWbrDU17YsKGMsqAJlr603MemDU+9rEJZOb+-QoShggwqgA6MIhpAApCNB3gBgAeeiYhqgA+Q-LqgEpnwdYt3f2jk9Qzy+uLDYDyeo1eZCAA

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant