diff --git a/scripts/qapi.py b/scripts/qapi.py
index 1dc7641..e982970 100644
--- a/scripts/qapi.py
+++ b/scripts/qapi.py
@@ -908,8 +908,8 @@ class QAPISchemaEnumType(QAPISchemaType):


 class QAPISchemaArrayType(QAPISchemaType):
-    def __init__(self, name, info, element_type):
-        QAPISchemaType.__init__(self, name, info)
+    def __init__(self, name, element_type):
+        QAPISchemaType.__init__(self, name, None)
         assert isinstance(element_type, str)
         self._element_type_name = element_type
         self.element_type = None
@@ -917,6 +917,7 @@ class QAPISchemaArrayType(QAPISchemaType):
     def check(self, schema):
         self.element_type = schema.lookup_type(self._element_type_name)
         assert self.element_type
+        self._info = self.element_type._info

     def json_type(self):
         return 'array'
@@ -928,6 +929,7 @@ class QAPISchemaArrayType(QAPISchemaType):
 class QAPISchemaObjectType(QAPISchemaType):
     def __init__(self, name, info, base, local_members, variants):
         QAPISchemaType.__init__(self, name, info)
+        assert info or name == ':empty'
         assert base is None or isinstance(base, str)
         for m in local_members:
             assert isinstance(m, QAPISchemaObjectTypeMember)
@@ -1165,15 +1167,15 @@ class QAPISchema(object):
     def _make_array_type(self, element_type):
         name = element_type + 'List'
         if not self.lookup_type(name):
-            self._def_entity(QAPISchemaArrayType(name, None, element_type))
+            self._def_entity(QAPISchemaArrayType(name, element_type))
         return name

-    def _make_implicit_object_type(self, name, role, members):
+    def _make_implicit_object_type(self, name, info, role, members):
         if not members:
             return None
         name = ':obj-%s-%s' % (name, role)
         if not self.lookup_entity(name, QAPISchemaObjectType):
-            self._def_entity(QAPISchemaObjectType(name, None, None,
+            self._def_entity(QAPISchemaObjectType(name, info, None,
                                                   members, None))
         return name

@@ -1210,11 +1212,11 @@ class QAPISchema(object):
     def _make_variant(self, case, typ):
         return QAPISchemaObjectTypeVariant(case, typ)

-    def _make_simple_variant(self, case, typ):
+    def _make_simple_variant(self, info, case, typ):
         if isinstance(typ, list):
             assert len(typ) == 1
             typ = self._make_array_type(typ[0])
-        typ = self._make_implicit_object_type(typ, 'wrapper',
+        typ = self._make_implicit_object_type(typ, info, 'wrapper',
                                               [self._make_member('data', typ)])
         return QAPISchemaObjectTypeVariant(case, typ)

@@ -1232,7 +1234,7 @@ class QAPISchema(object):
             variants = [self._make_variant(key, value)
                         for (key, value) in data.iteritems()]
         else:
-            variants = [self._make_simple_variant(key, value)
+            variants = [self._make_simple_variant(info, key, value)
                         for (key, value) in data.iteritems()]
             tag_enum = self._make_tag_enum(name, variants)
         self._def_entity(
@@ -1263,7 +1265,7 @@ class QAPISchema(object):
         gen = expr.get('gen', True)
         success_response = expr.get('success-response', True)
         if isinstance(data, OrderedDict):
-            data = self._make_implicit_object_type(name, 'arg',
+            data = self._make_implicit_object_type(name, info, 'arg',
                                                    self._make_members(data))
         if isinstance(rets, list):
             assert len(rets) == 1
@@ -1275,7 +1277,7 @@ class QAPISchema(object):
         name = expr['event']
         data = expr.get('data')
         if isinstance(data, OrderedDict):
-            data = self._make_implicit_object_type(name, 'arg',
+            data = self._make_implicit_object_type(name, info, 'arg',
                                                    self._make_members(data))
         self._def_entity(QAPISchemaEvent(name, info, data))

