Skip to content

Enhancement on return values by enum-typed params #1588

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

Open
qiancy98 opened this issue Sep 24, 2022 · 0 comments
Open

Enhancement on return values by enum-typed params #1588

qiancy98 opened this issue Sep 24, 2022 · 0 comments
Labels
enhancement New feature or request

Comments

@qiancy98
Copy link

qiancy98 commented Sep 24, 2022

现在似乎无法将输出与输入的枚举值关联起来?(比如输入的第一个参数是"store"还是"load"决定了返回的是nil还是string,并作相应分析……?)

  • 暂时想的实现方式是@overload,完全一样的输入形式,只是枚举值不同,给出不同返回。
  • 又或者用某种@Generic T,然后加判断(不过感觉这样的功能,你会很难写……)

Similar issue:#1582

@sumneko sumneko added the enhancement New feature or request label Sep 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants