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

pset! does not work with generic memory pointers contained in generic tuples #315

Open
cianoc opened this issue Feb 4, 2018 · 0 comments

Comments

@cianoc
Copy link
Contributor

cianoc commented Feb 4, 2018

Test Code:

(bind-type Test <!a*,i64> (printer? . #f))

(bind-func Test:[Test{!a}*,i64]*
  (lambda (x)
    (let ((arr:!a* (halloc x)))
      (Test_z arr x))))

(bind-func put:[void,Test{!a}*,i64,!a]*
  (lambda (arr idx val)
    (pset! (tref arr 0) idx val)))

($ (let ((arr:Test{i64}* (Test 16)))
     (put arr 6 4)
     (println "finished")))

Produces the following error:
Type Error in pointer-set!, got i64*, was expecting i64

It seems that the compiler is inserting a spurious '*' somewhere in the process.

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