daokoder / dao

Dao Programming Language
http://daoscript.org
Other
198 stars 19 forks source link

Map copying doesn't work #500

Closed Night-walker closed 9 years ago

Night-walker commented 9 years ago
(dao) m = {1 -> 2}
= { 1 -> 2 }
(dao) m[:]
[[Error::Key]] --- Invalid key:

In code snippet:
      1 :  DATA        :     0 ,     0 ,     1 ;     1;   :
>>    2 :  GETI        :     0 ,     1 ,     2 ;     1;   m[:]
      3 :  RETURN      :     2 ,     1 ,     0 ;     1;   m[:]
Raised by:  __main__(), at instruction 2 in line 1 in file "interactive codes";
dumblob commented 9 years ago

How do we want to define slicing upon a map?

Night-walker commented 9 years ago

It is pretty well-defined: see 'Maps' in http://daovm.net/demo.html.

dumblob commented 9 years ago

Right, I forgot about that. By the way congratulations to such a nice issue number ;)

Night-walker commented 9 years ago

Scored new record today :)

daokoder commented 9 years ago

Fixed.