-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Template issue with try #19581
Comments
Templates are code substitution, so if you have This is not a Nim bug, and the fix would be to remove |
Thanks for quick help, it works now!
Andi
Am 03.03.2022 20:11 schrieb Danil Yarantsev:
Templates are code substitution, so if you have return in a template it'll get inserted as a return where the template was "called", so in the end you would get return return (try: some(parseType(val)) except: none(typeof T)).
--
Reply to this email directly, view it on GitHub [1], or unsubscribe [2].
Triage notifications on the go with GitHub Mobile for iOS [3] or Android [4].
You are receiving this because you authored the thread.Message ID: ***@***.***>
Links:
------
[1] #19581 (comment)
[2]
https://github.com/notifications/unsubscribe-auth/AALK7JTKZIFIKSOVC7JSHP3U6EFFDANCNFSM5P3J3QHQ
[3]
https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675
[4]
https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub
|
I assume that I can close this issue then :) |
This issue was closed.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi
I learned something from #19576 but run into a next issue while trying to provide a template for typed string conversion. Tree versions constructive on each other work fine if coded as procs but fail as templates, the shortest complete runable example attached:
works well as proc:
is called as:
Using: nim 1.6.4
Thanks for help!
Andi
nimq1.zip
The text was updated successfully, but these errors were encountered: