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

? does not work at compiletime #53

Open
etan-status opened this issue Jan 21, 2025 · 1 comment
Open

? does not work at compiletime #53

etan-status opened this issue Jan 21, 2025 · 1 comment

Comments

@etan-status
Copy link
Contributor

etan-status commented Jan 21, 2025

import results

func f: Opt[int] =
  discard

func g: Opt[int] =
  const r = ? f()
  ok r

echo $g()
% nim -v
Nim Compiler Version 2.0.14 [MacOSX: arm64]
Compiled at 2025-01-06
Copyright (c) 2006-2023 by Andreas Rumpf

git hash: bf4de6a394e040d9810cba8c69fb2829ff04dcc6
active boot switches: -d:release
/Users/etan/Documents/Repos/nimbus-eth2/vendor/nim-results/results.nim(1544, 7) Error: cannot evaluate at compile time: v`gensym0
@tersec
Copy link
Contributor

tersec commented Jan 21, 2025

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

2 participants