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

Unexpected crash with mif and cto functions #199

Closed
ChengCat opened this issue Oct 2, 2018 · 1 comment
Closed

Unexpected crash with mif and cto functions #199

ChengCat opened this issue Oct 2, 2018 · 1 comment

Comments

@ChengCat
Copy link
Contributor

ChengCat commented Oct 2, 2018

The following program will crash, but it works fine if I remove (attr cto).

(import cstdio)
(def f (fn (attr cto) intern bool (void)
  true))
(def main (fn extern-c int (void)
  (printf "%d\n" (mif (f) 1 2))))
tomhrr added a commit that referenced this issue Oct 9, 2018
When an anonymous function is created in order to parse a value, it
needs to be marked as compile-time only (CTO), so that it may itself
include calls to CTO functions.
@tomhrr
Copy link
Owner

tomhrr commented Oct 9, 2018

Thanks for this, the problem has now been fixed.

@ChengCat ChengCat closed this as completed Oct 9, 2018
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