Index: tools/dom/scripts/dartgenerator.py |
diff --git a/tools/dom/scripts/dartgenerator.py b/tools/dom/scripts/dartgenerator.py |
index e3e96257a7836ce88c7adb378bd6972bcf8fd90d..e03a0fa39b9a2dbc525f364df50602b0cdaeabd0 100755 |
--- a/tools/dom/scripts/dartgenerator.py |
+++ b/tools/dom/scripts/dartgenerator.py |
@@ -12,7 +12,7 @@ import os |
import re |
import shutil |
from generator import * |
-from idlnode import IDLType |
+from idlnode import IDLType, resolveTypedef |
_logger = logging.getLogger('dartgenerator') |
@@ -98,6 +98,15 @@ class DartGenerator(object): |
type_name.endswith('Constructor')): |
_logger.warn('removing %s in %s which has unidentified type %s' % |
(node_name, interface.id, type_name)) |
+ |
+ # One last check is the type a typedef in an IDL file (the typedefs |
+ # are treated as global). |
+ resolvedType = resolveTypedef(idl_type) |
+ if (resolvedType != idl_type): |
+ idl_type.id = resolvedType.id |
+ idl_type.nullable = resolvedType.nullable |
+ continue |
+ |
return False |
return True |