-
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.
#2388. Rename and reorder static_analysis_member_invocation_A06_t* te…
…sts (#2397) Renaming operations: static_analysis_member_invocation_A06_t03.dart -> *02* static_analysis_member_invocation_A06_t05.dart -> *03* static_analysis_member_invocation_A06_t06.dart -> *05* static_analysis_member_invocation_A06_t07.dart -> *06* tatic_analysis_member_invocation_A06_t08.dart -> *04* .. plus a couple of small changes in a `@description`.
- Loading branch information
Showing
6 changed files
with
133 additions
and
132 deletions.
There are no files selected for viewing
36 changes: 36 additions & 0 deletions
36
LanguageFeatures/Extension-types/static_analysis_member_invocation_A06_t02.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 |
---|---|---|
@@ -0,0 +1,36 @@ | ||
// 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 We say that an extension type declaration DV has an extension | ||
/// type member named n in the cases where: | ||
/// - DV declares a member named n. | ||
/// - DV has no such declaration, but DV has a direct extension type | ||
/// superinterface V that has an extension type member named n due to a member | ||
/// declaration DM2, and DV does not declare a member that precludes DM2. | ||
/// | ||
/// @description Checks that if an extension type `ET` has a superinterface with | ||
/// a member `m` then this member is also present in `ET` but members of its | ||
/// representation type are not | ||
/// @author sgrekhov22@gmail.com | ||
// SharedOptions=--enable-experiment=inline-class | ||
|
||
extension type ET0(int id) { | ||
void m1() {} | ||
int get m2 => 42; | ||
void set m3(int val) {} | ||
} | ||
|
||
extension type ET1(int id) implements ET0 {} | ||
|
||
main() { | ||
ET1 et1 = ET1(42); | ||
et1.m1(); | ||
et1.m2; | ||
et1.m3 = 42; | ||
et1.ceil(); | ||
// ^^^^ | ||
// [analyzer] unspecified | ||
// [cfe] unspecified | ||
} |
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
File renamed without changes.
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
62 changes: 0 additions & 62 deletions
62
LanguageFeatures/Extension-types/static_analysis_member_invocation_A06_t07.dart
This file was deleted.
Oops, something went wrong.