Fuchsia: Handling of more cases for default initialization in FIDL/JS

Initializing a struct member with the value of an enum would previously
fail to compile; implement this. This is slightly awkward because the
front end does not scope the enum value to the enum like the C++ (and
JS) bindings but rather only to the library. So the compiler needs to
know the type to which it's being assigned and use that to determine how
the enum's value is intended to be qualified.

Bug: 883496
Change-Id: Id8a9f75d07bb0acb11963ecbd37d4915b36c28e0
Reviewed-on: https://chromium-review.googlesource.com/c/1313286
Commit-Queue: Scott Graham <scottmg@chromium.org>
Reviewed-by: Wez <wez@chromium.org>
Cr-Commit-Position: refs/heads/master@{#605601}
3 files changed