Dart: do not export nested types defined in internal types #1606
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
In the case of Dart the nested types defined in types
annotated as
@Internal
were exported. This was invalidbehaviour -- 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 uses
@Internal
.This change:
is internal from DartVisibilityResolver.kt to DartGeneratorPredicates.kt
to preserve the existing behaviour of checking if type is internal
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
.