-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Dart: do not export nested types defined in @internal types
In the case of Dart the nested types defined in types annotated as @InterAl were exported. This was invalid behaviour -- such types shall not have been exported. The root cause for that was usage of 'CommonGeneratorPredicates' to check if type is internal. In the case of Dart there is no type nesting and all types are outside. The common version of predicate did not check if any of parent types are @internal. This change: - moves Dart specific logic responsible for checking if LimeType is internal from DartVisibilityResolver.kt to DartGeneratorPredicates.kt - injects the predicate to DartVisibilityResolver via constructor in order to preserve the existing behaviour of checking if type is internal - fixes the way how DartGenerator.generateDart() selects types to export by using Dart specific predicate instead of the generic one Note: this change adjusts smoke tests to show, that the internal types like structs, classes and lambdas are no longer exported when their parent type is @internal. Signed-off-by: Patryk Wrobel <[email protected]>
- Loading branch information
1 parent
3ae6209
commit f6b598e
Showing
4 changed files
with
22 additions
and
30 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
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
2 changes: 0 additions & 2 deletions
2
gluecodium/src/test/resources/smoke/visibility_attribute/output/dart/lib/smoke.dart
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