File tree Expand file tree Collapse file tree 2 files changed +25
-0
lines changed
test/integration_tests/diff Expand file tree Collapse file tree 2 files changed +25
-0
lines changed Original file line number Diff line number Diff line change @@ -204,6 +204,10 @@ class APIRelevantElementsCollector extends RecursiveElementVisitor2<void> {
204204 if (element.enclosingElement2 is EnumElement2 ) {
205205 return false ;
206206 }
207+ // constructors of private classes aren't collected
208+ if (element.enclosingElement2.isPrivate) {
209+ return false ;
210+ }
207211 }
208212 // don't collect any override -> already part of the source
209213 if (element is Annotatable &&
Original file line number Diff line number Diff line change @@ -40,5 +40,26 @@ void main() {
4040 expect (breakingChanges, []);
4141 });
4242 });
43+
44+ group ('objective_c' , () {
45+ late final PackageApi objcApi;
46+ final refObjc = '0924cb0e80ed6ac39298363fabe0916808a4a1fe' ;
47+
48+ setUp (() async {
49+ final objcRetriever = GitPackageApiRetriever (
50+ gitUrl,
51+ refObjc,
52+ relativePackagePath: 'pkgs/objective_c' ,
53+ );
54+ objcApi = await objcRetriever.retrieve ();
55+ });
56+
57+ test ('_FinalizablePointer should not be leaked in the public API' ,
58+ () async {
59+ final hasFinalizablePointer = objcApi.interfaceDeclarations
60+ .any ((id) => id.name == '_FinalizablePointer' );
61+ expect (hasFinalizablePointer, isFalse);
62+ });
63+ });
4364 });
4465}
You can’t perform that action at this time.
0 commit comments