File tree 4 files changed +29
-1
lines changed 4 files changed +29
-1
lines changed Original file line number Diff line number Diff line change @@ -1389,6 +1389,17 @@ void main() {
1389
1389
});
1390
1390
1391
1391
group ('Class edge cases' , () {
1392
+ test ('Inherit from private class across private library to public library' ,
1393
+ () {
1394
+ Class GadgetExtender = packageGraph.localPublicLibraries
1395
+ .firstWhere ((l) => l.name == 'gadget_extender' )
1396
+ .allClasses
1397
+ .firstWhere ((c) => c.name == 'GadgetExtender' );
1398
+ Field gadgetGetter =
1399
+ GadgetExtender .allFields.firstWhere ((f) => f.name == 'gadgetGetter' );
1400
+ expect (gadgetGetter.isCanonical, isTrue);
1401
+ });
1402
+
1392
1403
test (
1393
1404
'ExecutableElements from private classes and from public interfaces (#1561)' ,
1394
1405
() {
Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ import 'package:path/path.dart' as path;
17
17
/// The number of public libraries in testing/test_package, minus 2 for
18
18
/// the excluded libraries listed in the initializers for _testPackageGraphMemo
19
19
/// and minus 1 for the <nodoc> tag in the 'excluded' library.
20
- const int kTestPackagePublicLibraries = 15 ;
20
+ const int kTestPackagePublicLibraries = 16 ;
21
21
22
22
final RegExp quotables = RegExp (r'[ "\r\n\$]' );
23
23
final RegExp observatoryPortRegexp =
Original file line number Diff line number Diff line change
1
+ // Copyright (c) 2020, the Dart project authors. Please see the AUTHORS file
2
+ // for details. All rights reserved. Use of this source code is governed by a
3
+ // BSD-style license that can be found in the LICENSE file.
4
+
5
+ import 'src/gadget.dart' ;
6
+
7
+ class GadgetExtender extends Gadget {}
Original file line number Diff line number Diff line change
1
+ // Copyright (c) 2020, the Dart project authors. Please see the AUTHORS file
2
+ // for details. All rights reserved. Use of this source code is governed by a
3
+ // BSD-style license that can be found in the LICENSE file.
4
+
5
+ class _GadgetBase {
6
+ int get gadgetGetter => 5 ;
7
+ }
8
+
9
+
10
+ class Gadget extends _GadgetBase {}
You can’t perform that action at this time.
0 commit comments