Arc Forumnew | comments | leaders | submitlogin
(= tem!key 1) sets tem!key to 1 but returns nil
2 points by bh 3630 days ago | 1 comment
I create a template,

    arc> (deftem test
           x nil)
    ((x #<procedure: g1748>))
initialize one, and set one of its fields (I don't know what they're called) to 1 using =

    arc> (let y (inst 'test)
           (= y!x 1))
    nil
but this returns nil. y!x has been set to 1

    arc> (let y (inst 'test)
           (= y!x 1)
           y!x)
    3
though. Is this a bug or what am I not getting?


2 points by akkartik 3630 days ago | link

Yeah, that's a bug on my part in anarki. Thanks for the report!

Edit 10 minutes later: now fixed: https://github.com/arclanguage/anarki/commit/fcfbfcdb80. Thanks again.

-----