Skip to content

Commit bd548bb

Browse files
committed
Testing for reexports.
1 parent f6d7e4f commit bd548bb

File tree

3 files changed

+18
-0
lines changed

3 files changed

+18
-0
lines changed

testing/test_package/lib/example.dart

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -677,4 +677,5 @@ extension on Object {
677677

678678
/// This class has nothing to do with [_Shhh], [FancyList], or [AnExtension.call],
679679
/// but should not crash because we referenced them.
680+
/// We should be able to find [DocumentThisExtensionOnce], too.
680681
class ExtensionReferencer {}

testing/test_package/lib/reexport_two.dart

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
/// {@canonicalFor reexport.somelib.SomeClass}
22
/// {@canonicalFor reexport.somelib.AUnicornClass}
33
/// {@canonicalFor something.ThatDoesntExist}
4+
/// {@canonicalFor reexport.somelib.DocumentThisExtensionOnce}
45
/// {@category Unreal}
56
library reexport_two;
67

testing/test_package/lib/src/somelib.dart

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,19 @@ class SomeOtherClass {}
77
class YetAnotherClass {}
88

99
class AUnicornClass {}
10+
11+
12+
/// A private extension.
13+
extension _Unseen on Object {
14+
void doYouSeeMe() { }
15+
}
16+
17+
/// An extension without a name
18+
extension on List {
19+
void somethingNew() { }
20+
}
21+
22+
/// [_Unseen] is not seen, but [DocumentMe] is.
23+
extension DocumentThisExtensionOnce on String {
24+
String get reportOnString => '$this is wonderful';
25+
}

0 commit comments

Comments
 (0)