| Index: mojo/public/tools/bindings/generators/dart_templates/union_definition.tmpl
|
| diff --git a/mojo/public/tools/bindings/generators/dart_templates/union_definition.tmpl b/mojo/public/tools/bindings/generators/dart_templates/union_definition.tmpl
|
| index 511201eb30da382ae42d4f2506a3ab71108972fa..0dcfe87659297d1ce45f0740752517eb6c81bd87 100644
|
| --- a/mojo/public/tools/bindings/generators/dart_templates/union_definition.tmpl
|
| +++ b/mojo/public/tools/bindings/generators/dart_templates/union_definition.tmpl
|
| @@ -1,8 +1,9 @@
|
| {#--- Begin #}
|
|
|
| {%- import "encoding_macros.tmpl" as encoding_macros %}
|
| +{% import "mojom_type_macros.tmpl" as mojom_type_macros %}
|
|
|
| -{%- macro enum_def(union) %}
|
| +{%- macro enum_def(union, typepkg, package) %}
|
| enum {{union|name}}Tag {
|
| {%- for field in union.fields %}
|
| {{field|tag_name}},
|
| @@ -64,6 +65,8 @@ class {{union|name}} extends bindings.Union {
|
| {%- endif %}
|
| break;
|
| {%- endfor %}
|
| + default:
|
| + assert(false);
|
| }
|
|
|
| return result;
|
| @@ -83,6 +86,8 @@ class {{union|name}} extends bindings.Union {
|
| {%- endif %}
|
| break;
|
| {%- endfor %}
|
| + default:
|
| + assert(false);
|
| }
|
| }
|
|
|
| @@ -104,7 +109,9 @@ class {{union|name}} extends bindings.Union {
|
| {%- endmacro %}
|
|
|
|
|
| -{%- macro union_def(union) %}
|
| +{%- macro union_def(union, typepkg, package) %}
|
| {{enum_def(union)}}
|
| {{wrapper_def(union)}}
|
| +
|
| +{{ mojom_type_macros.writeMojomTypeDef(union, typepkg, package) }}
|
| {%- endmacro %}
|
|
|