[fidlmerge json] Read Unions instead of XUnions
See step 4/5 of linked bug
Bug: 45702
Change-Id: I9fb88714a4b5d1fefc597c52a370eada44c8ef84
diff --git a/bin/dart_fidl_json/json.fidlmerge b/bin/dart_fidl_json/json.fidlmerge
index f1c0b7c..495a575 100644
--- a/bin/dart_fidl_json/json.fidlmerge
+++ b/bin/dart_fidl_json/json.fidlmerge
@@ -330,7 +330,7 @@
{{- template "FileHeader" . }}
{{- template "FidlInclude" . }}
{{- template "EnumConverterDecls" . }}
- {{- template "UnionConverterDecls" .XUnions }}
+ {{- template "UnionConverterDecls" .Unions }}
{{- template "StructConverterDecls" . }}
{{- template "TableConverterDecls" . }}
{{- end }}
diff --git a/bin/fidlgen_dart/backend/ir/ir.go b/bin/fidlgen_dart/backend/ir/ir.go
index 0de8658..3798432 100644
--- a/bin/fidlgen_dart/backend/ir/ir.go
+++ b/bin/fidlgen_dart/backend/ir/ir.go
@@ -1169,10 +1169,6 @@
root.Unions = append(root.Unions, c.compileUnion(v))
}
- if len(r.XUnions) > 0 {
- panic("xunions should not be used anymore")
- }
-
for _, v := range r.Interfaces {
root.Interfaces = append(root.Interfaces, c.compileInterface(v))
}