Index: sdk/lib/html/scripts/htmldartgenerator.py |
diff --git a/sdk/lib/html/scripts/htmldartgenerator.py b/sdk/lib/html/scripts/htmldartgenerator.py |
index 5275cf131958b96b7086c851b066fcfcc7042e3c..1d7e1c067c8effe7cb5c3e38b2cdaee6a61904b3 100644 |
--- a/sdk/lib/html/scripts/htmldartgenerator.py |
+++ b/sdk/lib/html/scripts/htmldartgenerator.py |
@@ -274,7 +274,7 @@ class HtmlDartGenerator(object): |
' if (!?$OPT_PARAM_NAME) {\n' |
' return $FACTORY._create($FACTORY_PARAMS);\n' |
' }\n', |
- OPT_PARAM_NAME=constructor_info.param_infos[index].name, |
+ OPT_PARAM_NAME=param_info.name, |
FACTORY=factory_name, |
FACTORY_PARAMS=constructor_info.ParametersAsArgumentList(index)) |
else: |
@@ -293,8 +293,7 @@ class HtmlDartGenerator(object): |
for index, param_info in enumerate(constructor_info.param_infos): |
if param_info.is_optional: |
- inits.Emit(' if ($E != null) e.$E = $E;\n', |
- E=constructor_info.param_infos[index].name) |
+ inits.Emit(' if ($E != null) e.$E = $E;\n', E=param_info.name) |
if not constructor_info.pure_dart_constructor: |
template_file = ('factoryprovider_%s.darttemplate' % self._interface.doc_js_name) |