Skip to content

Commit a958915

Browse files
aristidispmeta-codesync[bot]
authored andcommitted
fbcode/common/
Reviewed By: iahs Differential Revision: D94736208 fbshipit-source-id: 59719939be1030b0b47760d87e1556d3764b17f2
1 parent b683e68 commit a958915

4 files changed

Lines changed: 11 additions & 0 deletions

File tree

compiler/test/if/a.thrift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
# @nolint
44

55
include "test/if/b.thrift"
6+
include "thrift/annotation/thrift.thrift"
67

78
typedef i64 T
89

@@ -15,6 +16,7 @@ struct A {
1516
5: map<i32, string> e;
1617
6: b.Number f = b.Two;
1718
7: optional string g;
19+
@thrift.AllowUnsafeRequiredFieldQualifier
1820
8: required string h;
1921
}
2022

tests/if/constants.thrift

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
* LICENSE file in the root directory of this source tree.
77
*/
88

9+
include "thrift/annotation/thrift.thrift"
10+
911
const i32 i32Const = 99;
1012

1113
const bool boolConst = 0;
@@ -53,6 +55,7 @@ const string_9425 byteStrConst = "string";
5355
const i64 negative = -1;
5456

5557
struct NagativeFields {
58+
@thrift.AllowUnsafeRequiredFieldQualifier
5659
1: required i64 u = negative;
5760
2: optional i64 v = -1;
5861
3: i64 w = -2;

tests/if/foo.thrift

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,13 @@
66
* LICENSE file in the root directory of this source tree.
77
*/
88

9+
include "thrift/annotation/thrift.thrift"
10+
911
typedef i64 X
1012

1113
struct Foo {
1214
1: optional i64 foo1;
15+
@thrift.AllowUnsafeRequiredFieldQualifier
1316
2: required bool foo2;
1417
3: Bar foo3;
1518
4: X foo4;

tests/if/hs_test.thrift

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88

99
hs_include "if/hs_test_instances.hs"
1010

11+
include "thrift/annotation/thrift.thrift"
12+
1113
typedef i64 X (hs.newtype)
1214
typedef X Y
1315
typedef Y Z (hs.newtype)
@@ -24,6 +26,7 @@ union tUnion {
2426
}
2527

2628
struct TestStruct {
29+
@thrift.AllowUnsafeRequiredFieldQualifier
2730
1: required bool f_bool;
2831
2: byte f_byte;
2932
3: double f_double;

0 commit comments

Comments
 (0)