Jens Geyer | 273607d | 2021-07-31 23:25:51 +0200 | [diff] [blame] | 1 | # Licensed to the Apache Software Foundation (ASF) under one |
| 2 | # or more contributor license agreements. See the NOTICE file |
| 3 | # distributed with this work for additional information |
| 4 | # regarding copyright ownership. The ASF licenses this file |
| 5 | # to you under the Apache License, Version 2.0 (the |
| 6 | # "License"); you may not use this file except in compliance |
| 7 | # with the License. You may obtain a copy of the License at |
| 8 | # |
| 9 | # http://www.apache.org/licenses/LICENSE-2.0 |
| 10 | # |
| 11 | # Unless required by applicable law or agreed to in writing, software |
| 12 | # distributed under the License is distributed on an "AS IS" BASIS, |
| 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 14 | # See the License for the specific language governing permissions and |
| 15 | # limitations under the License. |
| 16 | |
| 17 | // Testcases for |
| 18 | // - THRIFT-5091 Netstd generator produces uncompileable code for struct names ending with "_result" or "_args" |
| 19 | // - THRIFT-5444 netstd generator produces uncompileable code for enums ending with "_result" or "_args" |
Jens Geyer | c8ae621 | 2021-07-31 23:57:29 +0200 | [diff] [blame] | 20 | // - THRIFT-5445 "cancellationToken" cannot be used as argument name |
Jens Geyer | 273607d | 2021-07-31 23:25:51 +0200 | [diff] [blame] | 21 | |
| 22 | namespace * name_conflicts |
| 23 | |
| 24 | include "name_conflicts.enum.thrift" |
| 25 | |
| 26 | struct some_struct_args { |
| 27 | 1: name_conflicts.enum.some_args some_args |
| 28 | 2: name_conflicts.enum.some_result some_result |
Jens Geyer | c8ae621 | 2021-07-31 23:57:29 +0200 | [diff] [blame] | 29 | 3: required i32 cancellationToken |
Jens Geyer | 273607d | 2021-07-31 23:25:51 +0200 | [diff] [blame] | 30 | } |
| 31 | |
| 32 | exception some_error_result { |
| 33 | 1: name_conflicts.enum.some_args some_args |
| 34 | 2: name_conflicts.enum.some_result some_result |
Jens Geyer | c8ae621 | 2021-07-31 23:57:29 +0200 | [diff] [blame] | 35 | 3: optional i32 cancellationToken |
Jens Geyer | 273607d | 2021-07-31 23:25:51 +0200 | [diff] [blame] | 36 | } |
| 37 | |
| 38 | service some_service { |
| 39 | |
| 40 | name_conflicts.enum.some_result some_method( |
| 41 | 1: name_conflicts.enum.some_args some_args |
| 42 | 2: some_struct_args more_args |
Jens Geyer | c8ae621 | 2021-07-31 23:57:29 +0200 | [diff] [blame] | 43 | 3: i32 cancellationToken |
Jens Geyer | 273607d | 2021-07-31 23:25:51 +0200 | [diff] [blame] | 44 | ) throws ( |
Jens Geyer | c8ae621 | 2021-07-31 23:57:29 +0200 | [diff] [blame] | 45 | 1: some_error_result cancellationToken |
Jens Geyer | 273607d | 2021-07-31 23:25:51 +0200 | [diff] [blame] | 46 | ) |
| 47 | |
| 48 | } |
| 49 | |
| 50 | // EOF |