Fixed an issue with set literals. (The Array type was wrong before.)

This commit is contained in:
Dave Halter
2014-11-14 16:54:46 +01:00
parent fce715b867
commit 0567a886c4

View File

@@ -174,6 +174,13 @@ class Array(IterableWrapper):
self._atom = atom
self.type = Array.mapping[atom.children[0]]
c = self._atom.children
array_node = c[1]
if self.type == pr.Array.DICT and array_node != '}' \
and (not hasattr(array_node, 'children')
or ':' not in array_node.children):
self.type = pr.Array.SET
@property
def name(self):
return helpers.FakeName(self.type, parent=self)