blob: 0a98cbca17cb2f486fa5c9817de289d807b115c5 [file] [log] [blame]
library fidl.test.typealiases;
using someotherlibrary;
// This is not a reference to library zx to avoid complexity in the test data.
// A local handle is defined here that contains subtypes that this test cares
// about.
enum obj_type : uint32 {
NONE = 0;
CHANNEL = 4;
};
resource_definition handle : uint32 {
properties {
obj_type subtype;
};
};
alias u32 = uint32;
alias vec_of_strings = vector<string>;
alias vec_of_strings_at_most_5 = vector<string>:5;
alias channel = handle:CHANNEL;
alias client_end = channel;
resource struct ExampleOfUseOfAliases {
u32 field_of_u32;
vec_of_strings field_of_vec_of_strings;
vec_of_strings:9 field_of_vec_of_strings_at_most_nine;
vec_of_strings_at_most_5 field_of_vec_of_strings_at_most_5;
vector<someotherlibrary.ReferenceMe>:5 field_of_vec_of_ref_me_at_most_5;
channel field_of_channel;
client_end field_of_client_end;
client_end? field_of_nullable_client_end;
};