-
Notifications
You must be signed in to change notification settings - Fork 245
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: deprecation warnings are generated even when one property is not…
… deprecated (#3157) This happens when: 1. An interface inherits from at least two other interfaces. 2. Both super-interfaces have a property with the same name. 3. The property is deprecated in one, but not the other. The solution here is to inline the `print` calls for properties coming from the super types, instead of calling the functions that handle those super types. If there is a conflict (i.e. item 3 above), then the warning is suppressed for that property. In terms of implementation, this is achieved by recursively calling the function that processes the warnings for interface types. Every property that is found is added to a map and non-deprecated properties are added to an exclusion list. At the end, properties that are in the exclusion list are removed from the final statements list. --- By submitting this pull request, I confirm that my contribution is made under the terms of the [Apache 2.0 license]. [Apache 2.0 license]: https://www.apache.org/licenses/LICENSE-2.0
- Loading branch information
1 parent
ca04dad
commit e566f37
Showing
2 changed files
with
172 additions
and
101 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