-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
- Loading branch information
Showing
5 changed files
with
40 additions
and
88 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
34 changes: 20 additions & 14 deletions
34
Language/Expressions/Method_Invocation/Super_Invocation/accessible_instance_member_t03.dart
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,33 @@ | ||
// Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | ||
// Copyright (c) 2023, the Dart project authors. Please see the AUTHORS file | ||
// for details. All rights reserved. Use of this source code is governed by a | ||
// BSD-style license that can be found in the LICENSE file. | ||
|
||
/// @assertion Let Sstatic be the superclass of the immediately enclosing class. | ||
/// It is a static type warning if Sstatic does not have an accessible instance | ||
/// member named m unless Sstatic or a superinterface of Sstatic is annotated | ||
/// with an annotation denoting a constant identical to the constant @proxy | ||
/// defined in dart:core. | ||
/// @description Checks that it is a compile error if superclass | ||
/// does not have an instance member named m | ||
/// @author kaigorodov | ||
/// @assertion Let Ssuper be the superclass of the immediately enclosing class | ||
/// for i, and let L be the library that contains i. Let the declaration D be | ||
/// the result of looking up the method m in Ssuper with respect to L, and let F | ||
/// be the static type of D. Otherwise, if the method lookup failed, let the | ||
/// declaration D be the result of looking up the getter m with respect to L in | ||
/// Ssuper, and let F be the return type of D. If both lookups failed, a | ||
/// compile-time error occurs | ||
/// | ||
/// @description Checks that it is a compile-time error if a superclass does not | ||
/// have an instance member named `m` | ||
/// @author sgrekhov22@gmail.com | ||
/// @issue 52901 | ||
class S {} | ||
abstract class A { | ||
void m(); | ||
} | ||
|
||
class A extends S { | ||
test() { | ||
super.nonExistingMethod(); | ||
abstract class C extends A { | ||
void n() { | ||
super.m(); | ||
// ^ | ||
// [analyzer] unspecified | ||
// [cfe] unspecified | ||
} | ||
} | ||
|
||
main() { | ||
A a = new A(); | ||
print(C); | ||
} |
29 changes: 0 additions & 29 deletions
29
Language/Expressions/Method_Invocation/Super_Invocation/accessible_instance_member_t04.dart
This file was deleted.
Oops, something went wrong.
29 changes: 0 additions & 29 deletions
29
Language/Expressions/Method_Invocation/Super_Invocation/accessible_instance_member_t05.dart
This file was deleted.
Oops, something went wrong.