1
0
forked from Mirror/wren
Files
wren/test/language/class/attributes/duplicate_keys.wren
ruby a4ae905384 Introduce Attributes (#962)
* introduce Attributes for classes and methods
2021-04-08 21:30:09 -07:00

12 lines
380 B
Plaintext

// Duplicate keys add multiple values to
// the attribute's key, in parse order
#!key
#!key = value
#!key=other
class DuplicateKeys {}
var dupeGroup = DuplicateKeys.attributes.self[null]
System.print(dupeGroup.count) // expect: 1
System.print(dupeGroup["key"].count) // expect: 3
System.print(dupeGroup["key"]) // expect: [null, value, other]