1/* 2 * Copyright (c) Facebook, Inc. and its affiliates. 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 17// A set of defintions that require special care in the code gen. 18namespace cpp2 apache.thrift.test.reflection 19 20// An enum that has a value with the same name. 21enum EnumAndValue { 22 EnumAndValue = 1, 23} 24 25enum EnumAndUnion_Type { 26 foo = 0, 27} 28union EnumAndUnion { 29 1: i32 foo; 30} 31 32// Names used in fatal reflection code gen. 33enum enums { 34 Value = 1, 35} 36enum type { 37 Value = 1, 38} 39struct name { 40 1: i32 foo; 41} 42union member { 43 1: i32 foo; 44} 45struct members { 46 1: i32 foo; 47} 48union unions { 49 1: i32 name; 50 2: i32 type; 51 3: bool member; 52 4: bool members; 53} 54struct structs { 55 1: i32 name; 56 2: i32 type; 57 3: bool member; 58 4: bool members; 59} 60struct strings { 61 1: i32 name; 62 2: i32 type; 63 3: bool member; 64 4: bool members; 65} 66exception exceptions { 67 1: i32 name; 68 2: i32 type; 69 3: bool member; 70 4: bool members; 71} 72service services { 73} 74const i32 constants = 1; 75const i32 troublesome__unique_strings_list = 2; 76const i32 apache_thrift_test_troublesome__unique_strings_list = 2; 77