-
Notifications
You must be signed in to change notification settings - Fork 613
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Disallow initializing structs with lists
Summary: The following code ``` struct S {} const S s = [1, 2, 3]; ``` currently compiles in Thrift (the list content is ignored, at least in cpp2) which is obviously broken. Turn it into an error as we do for other incompatible initializers. Add more test cases for struct initialization. Reviewed By: avalonalex Differential Revision: D50476253 fbshipit-source-id: 2608e3fdcf655ab8142194729e70e5590b893c22
- Loading branch information
1 parent
fb35564
commit e4a4675
Showing
2 changed files
with
8 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters