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

Error when initializing unboxed types #1998

Closed
arthurpaulino opened this issue Dec 29, 2022 · 0 comments
Closed

Error when initializing unboxed types #1998

arthurpaulino opened this issue Dec 29, 2022 · 0 comments

Comments

@arthurpaulino
Copy link
Contributor

arthurpaulino commented Dec 29, 2022

Description

Initialization is not working for unboxed types like UInt64 and Bool on compiled code

Steps to Reproduce

Start a file like this:

initialize test : UInt64 ← pure 0

def main : IO Unit :=
  IO.println test

Then compile and run it.

Expected behavior:

It should output 0

Actual behavior:

It breaks with an error like this:

error: incompatible pointer to integer conversion assigning to 'uint64_t' (aka 'unsigned long') from 'b_lean_obj_res' (aka 'lean_object *') [-Wint-conversion]
l_test = lean_io_result_get_value(res);
       ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.

Reproduces how often:

Everytime it's executed as compiled code. Although it works on the kernel.

Versions

I'm on Ubuntu. This is the output of lake --version:
Lake version 4.1.0-pre (Lean version 4.0.0-nightly-2022-12-16)

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