commit | ebc14b6ffd29c02bb6fcdf8acd87d8a65c1ee002 | [log] [tgz] |
---|---|---|
author | Pascal Perez <pascallouis@google.com> | Fri Apr 05 22:24:31 2019 +0000 |
committer | CQ bot account: commit-bot@chromium.org <commit-bot@chromium.org> | Fri Apr 05 22:24:31 2019 +0000 |
tree | 58b3423ffe14f3e42c5e845c910acaeef09e5e4d | |
parent | 8f7c520654f446bd62bc9442b8e23395aa0e6b42 [diff] |
[fidlgen][dart] Avoid name clash on enum member V This is a quick point fix. Larger solutions are being worked on in: https://fuchsia-review.googlesource.com/c/topaz/+/266374 Change-Id: Idf432c26c4e37ca39373fbc65f9b35874c7e7f53
diff --git a/bin/fidlgen_dart/backend/templates/enum.tmpl.go b/bin/fidlgen_dart/backend/templates/enum.tmpl.go index 11b3145..dfe7c50 100644 --- a/bin/fidlgen_dart/backend/templates/enum.tmpl.go +++ b/bin/fidlgen_dart/backend/templates/enum.tmpl.go
@@ -11,8 +11,8 @@ ///{{ . -}} {{- end }} class {{ .Name }} extends $fidl.Enum { - factory {{ .Name }}(int v) { - switch (v) { + factory {{ .Name }}(int _v) { + switch (_v) { {{- range .Members }} case {{ .Value }}: return {{ .Name }};