-
Notifications
You must be signed in to change notification settings - Fork 28
/
Copy pathaugmented_expression_A08_t01_lib.dart
48 lines (37 loc) · 1.42 KB
/
augmented_expression_A08_t01_lib.dart
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
// Copyright (c) 2024, 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 Assume that the identifier `augmented` occurs in a source
/// location where no enclosing declaration is augmenting. In this case, the
/// identifier is taken to be a reference to a declaration which is in scope.
///
/// @description Checks that if an identifier `augmented` occurs in a source
/// location where no enclosing declaration is augmenting then the identifier is
/// taken to be a reference to a declaration which is in scope. Test a function
/// named `augmented()`.
/// @author [email protected]
// SharedOptions=--enable-experiment=macros
part of 'augmented_expression_A08_t01.dart';
String topLevelFunction() => augmented();
class C {
static String staticMethod() => augmented();
String instanceMethod() => augmented();
}
mixin M {
static String staticMethod() => augmented();
String instanceMethod() => augmented();
}
class MA = Object with M;
enum E {
e1;
static String staticMethod() => augmented();
String instanceMethod() => augmented();
}
extension Ext on A {
static String staticMethod() => augmented();
String instanceMethod() => augmented();
}
extension type ET(int _) {
static String staticMethod() => augmented();
String instanceMethod() => augmented();
}