File tree Expand file tree Collapse file tree 5 files changed +64
-1
lines changed
dynamic_modules/test/data/overrideable_super Expand file tree Collapse file tree 5 files changed +64
-1
lines changed Original file line number Diff line number Diff line change @@ -1417,7 +1417,8 @@ class Translator with KernelNodes {
14171417 if (target.asMember.isInstanceMember) {
14181418 final table = dispatchTableForTarget (target);
14191419 final selector = table.selectorForTarget (target);
1420- if (selector.containsTarget (target)) {
1420+ if (selector.containsTarget (target) ||
1421+ selector.isDynamicSubmoduleOverridable) {
14211422 return selector.paramInfo;
14221423 }
14231424 }
Original file line number Diff line number Diff line change 1+ # Copyright (c) 2025, 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+ extendable :
5+ - library : ' shared/shared.dart'
6+ class : ' Base'
7+
8+ can-be-overridden :
9+ - library : ' shared/shared.dart'
10+ class : ' Base'
11+ member : ' toString'
12+
13+ callable :
14+ - library : ' dart:core'
15+ - library : ' shared/shared.dart'
16+ class : ' Other'
Original file line number Diff line number Diff line change 1+ // Copyright (c) 2025, 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 '../../common/testing.dart' as helper;
6+ import 'package:expect/expect.dart' ;
7+
8+ import 'shared/shared.dart' show Child, Other;
9+
10+ void main () async {
11+ final o1 = Other ();
12+ Child ();
13+ Expect .equals ('Instance of \' Other\' ' , o1.toString ());
14+ Expect .equals (3 , await helper.load ('entry1.dart' ));
15+ helper.done ();
16+ }
Original file line number Diff line number Diff line change 1+ // Copyright (c) 2025, 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+ @pragma ('dyn-module:entry-point' )
6+ Object ? dynamicModuleEntrypoint () {
7+ return 3 ;
8+ }
Original file line number Diff line number Diff line change 1+ // Copyright (c) 2025, 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+ abstract class Base {
6+ const Base ();
7+
8+ @override
9+ // ignore: unnecessary_overrides
10+ String toString () => super .toString ();
11+ }
12+
13+ class Child extends Base {
14+ @override
15+ // ignore: unnecessary_overrides
16+ String toString () => super .toString ();
17+ }
18+
19+ class Other {
20+ @override
21+ String toString ({bool ? someArg1, bool ? someArg2}) => super .toString ();
22+ }
You can’t perform that action at this time.
0 commit comments