removed the association literal notation
This commit is contained in:
@ -460,7 +460,7 @@ class Dictionary(Set)
|
||||
* to a dictionary with the dictionary/association expression notation
|
||||
* like this:
|
||||
*
|
||||
* :{ :( 1, 20 ), :( #moo, 999) }
|
||||
* :{ 1 -> 20, #moo -> 999 }
|
||||
*
|
||||
* it must return self for the way VM works.
|
||||
*)
|
||||
@ -473,6 +473,10 @@ class Dictionary(Set)
|
||||
hv := key hash.
|
||||
index := hv rem: bs.
|
||||
|
||||
(* as long as 'assoc' supports the message 'key' and 'value'
|
||||
* this dictionary should work. there is no explicit check
|
||||
* on this protocol of key and value. *)
|
||||
|
||||
while ((ass := self.bucket at: index) notNil)
|
||||
{
|
||||
if (key = ass key)
|
||||
@ -497,7 +501,9 @@ class Dictionary(Set)
|
||||
self.tally := ntally.
|
||||
self.bucket at: index put: assoc.
|
||||
|
||||
^self. ## it must return self for the instructions generated by the compiler.
|
||||
(* it must return self for the instructions generated by the compiler.
|
||||
* otherwise, VM will break. *)
|
||||
^self.
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user