|
| 1 | +// Copyright (c) 2024, 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 'dart:async'; |
| 6 | +import 'main.dart' as self; |
| 7 | + |
| 8 | +class Helper { |
| 9 | + const Helper(a); |
| 10 | +} |
| 11 | + |
| 12 | +mixin Mixin { |
| 13 | + static const int variable = 42; |
| 14 | + static void method() {} |
| 15 | + static void genericMethod<T>() {} |
| 16 | +} |
| 17 | + |
| 18 | +mixin GenericMixin<T> {} |
| 19 | + |
| 20 | +@Mixin.variable |
| 21 | +/*member: mixinConstant1: |
| 22 | +unresolved=UnresolvedExpression(UnresolvedAccess( |
| 23 | + UnresolvedIdentifier(Mixin).variable)) |
| 24 | +resolved=StaticGet(variable)*/ |
| 25 | +void mixinConstant1() {} |
| 26 | + |
| 27 | +@self.Mixin.variable |
| 28 | +/*member: mixinConstant2: |
| 29 | +unresolved=UnresolvedExpression(UnresolvedAccess( |
| 30 | + UnresolvedAccess( |
| 31 | + UnresolvedIdentifier(self).Mixin).variable)) |
| 32 | +resolved=StaticGet(variable)*/ |
| 33 | +void mixinConstant2() {} |
| 34 | + |
| 35 | +@Helper(Mixin) |
| 36 | +/*member: mixinConstant3: |
| 37 | +unresolved=UnresolvedExpression(UnresolvedInvoke( |
| 38 | + UnresolvedIdentifier(Helper) |
| 39 | + (UnresolvedExpression(UnresolvedIdentifier(Mixin))))) |
| 40 | +resolved=TypeLiteral(Mixin)*/ |
| 41 | +void mixinConstant3() {} |
| 42 | + |
| 43 | +@Helper(self.Mixin) |
| 44 | +/*member: mixinConstant4: |
| 45 | +unresolved=UnresolvedExpression(UnresolvedInvoke( |
| 46 | + UnresolvedIdentifier(Helper) |
| 47 | + (UnresolvedExpression(UnresolvedAccess( |
| 48 | + UnresolvedIdentifier(self).Mixin))))) |
| 49 | +resolved=TypeLiteral(Mixin)*/ |
| 50 | +void mixinConstant4() {} |
| 51 | + |
| 52 | +@Helper(Mixin.method) |
| 53 | +/*member: mixinConstant5: |
| 54 | +unresolved=UnresolvedExpression(UnresolvedInvoke( |
| 55 | + UnresolvedIdentifier(Helper) |
| 56 | + (UnresolvedExpression(UnresolvedAccess( |
| 57 | + UnresolvedIdentifier(Mixin).method))))) |
| 58 | +resolved=FunctionTearOff(method)*/ |
| 59 | +void mixinConstant5() {} |
| 60 | + |
| 61 | +@Helper(self.Mixin.method) |
| 62 | +/*member: mixinConstant6: |
| 63 | +unresolved=UnresolvedExpression(UnresolvedInvoke( |
| 64 | + UnresolvedIdentifier(Helper) |
| 65 | + (UnresolvedExpression(UnresolvedAccess( |
| 66 | + UnresolvedAccess( |
| 67 | + UnresolvedIdentifier(self).Mixin).method))))) |
| 68 | +resolved=FunctionTearOff(method)*/ |
| 69 | +void mixinConstant6() {} |
| 70 | + |
| 71 | +@Helper(Mixin.genericMethod) |
| 72 | +/*member: mixinConstant7: |
| 73 | +unresolved=UnresolvedExpression(UnresolvedInvoke( |
| 74 | + UnresolvedIdentifier(Helper) |
| 75 | + (UnresolvedExpression(UnresolvedAccess( |
| 76 | + UnresolvedIdentifier(Mixin).genericMethod))))) |
| 77 | +resolved=FunctionTearOff(genericMethod)*/ |
| 78 | +void mixinConstant7() {} |
| 79 | + |
| 80 | +@Helper(self.Mixin.genericMethod) |
| 81 | +/*member: mixinConstant8: |
| 82 | +unresolved=UnresolvedExpression(UnresolvedInvoke( |
| 83 | + UnresolvedIdentifier(Helper) |
| 84 | + (UnresolvedExpression(UnresolvedAccess( |
| 85 | + UnresolvedAccess( |
| 86 | + UnresolvedIdentifier(self).Mixin).genericMethod))))) |
| 87 | +resolved=FunctionTearOff(genericMethod)*/ |
| 88 | +void mixinConstant8() {} |
| 89 | + |
| 90 | +@Helper(Mixin.genericMethod<int>) |
| 91 | +/*member: mixinConstant9: |
| 92 | +unresolved=UnresolvedExpression(UnresolvedInvoke( |
| 93 | + UnresolvedIdentifier(Helper) |
| 94 | + (UnresolvedExpression(UnresolvedInstantiate( |
| 95 | + UnresolvedAccess( |
| 96 | + UnresolvedIdentifier(Mixin).genericMethod)<{unresolved-type-annotation:UnresolvedIdentifier(int)}>))))) |
| 97 | +resolved=Instantiation(FunctionTearOff(genericMethod)<int>)*/ |
| 98 | +void mixinConstant9() {} |
| 99 | + |
| 100 | +@Helper(self.Mixin.genericMethod<int>) |
| 101 | +/*member: mixinConstant10: |
| 102 | +unresolved=UnresolvedExpression(UnresolvedInvoke( |
| 103 | + UnresolvedIdentifier(Helper) |
| 104 | + (UnresolvedExpression(UnresolvedInstantiate( |
| 105 | + UnresolvedAccess( |
| 106 | + UnresolvedAccess( |
| 107 | + UnresolvedIdentifier(self).Mixin).genericMethod)<{unresolved-type-annotation:UnresolvedIdentifier(int)}>))))) |
| 108 | +resolved=Instantiation(FunctionTearOff(genericMethod)<int>)*/ |
| 109 | +void mixinConstant10() {} |
| 110 | + |
| 111 | +@Helper(GenericMixin) |
| 112 | +/*member: mixinConstant11: |
| 113 | +unresolved=UnresolvedExpression(UnresolvedInvoke( |
| 114 | + UnresolvedIdentifier(Helper) |
| 115 | + (UnresolvedExpression(UnresolvedIdentifier(GenericMixin))))) |
| 116 | +resolved=TypeLiteral(GenericMixin)*/ |
| 117 | +void mixinConstant11() {} |
| 118 | + |
| 119 | +@Helper(self.GenericMixin) |
| 120 | +/*member: mixinConstant12: |
| 121 | +unresolved=UnresolvedExpression(UnresolvedInvoke( |
| 122 | + UnresolvedIdentifier(Helper) |
| 123 | + (UnresolvedExpression(UnresolvedAccess( |
| 124 | + UnresolvedIdentifier(self).GenericMixin))))) |
| 125 | +resolved=TypeLiteral(GenericMixin)*/ |
| 126 | +void mixinConstant12() {} |
| 127 | + |
| 128 | +@Helper(GenericMixin<bool>) |
| 129 | +/*member: mixinConstant13: |
| 130 | +unresolved=UnresolvedExpression(UnresolvedInvoke( |
| 131 | + UnresolvedIdentifier(Helper) |
| 132 | + (UnresolvedExpression(UnresolvedInstantiate( |
| 133 | + UnresolvedIdentifier(GenericMixin)<{unresolved-type-annotation:UnresolvedIdentifier(bool)}>))))) |
| 134 | +resolved=TypeLiteral(GenericMixin<bool>)*/ |
| 135 | +void mixinConstant13() {} |
| 136 | + |
| 137 | +@Helper(self.GenericMixin<double>) |
| 138 | +/*member: mixinConstant14: |
| 139 | +unresolved=UnresolvedExpression(UnresolvedInvoke( |
| 140 | + UnresolvedIdentifier(Helper) |
| 141 | + (UnresolvedExpression(UnresolvedInstantiate( |
| 142 | + UnresolvedAccess( |
| 143 | + UnresolvedIdentifier(self).GenericMixin)<{unresolved-type-annotation:UnresolvedIdentifier(double)}>))))) |
| 144 | +resolved=TypeLiteral(GenericMixin<double>)*/ |
| 145 | +void mixinConstant14() {} |
| 146 | + |
| 147 | +@Helper(Mixin.unresolved) |
| 148 | +/*member: mixinConstant15: |
| 149 | +unresolved=UnresolvedExpression(UnresolvedInvoke( |
| 150 | + UnresolvedIdentifier(Helper) |
| 151 | + (UnresolvedExpression(UnresolvedAccess( |
| 152 | + UnresolvedIdentifier(Mixin).unresolved))))) |
| 153 | +resolved=UnresolvedExpression(UnresolvedAccess( |
| 154 | + MixinProto(Mixin).unresolved))*/ |
| 155 | +void mixinConstant15() {} |
| 156 | + |
| 157 | +@Helper(self.Mixin.unresolved) |
| 158 | +/*member: mixinConstant16: |
| 159 | +unresolved=UnresolvedExpression(UnresolvedInvoke( |
| 160 | + UnresolvedIdentifier(Helper) |
| 161 | + (UnresolvedExpression(UnresolvedAccess( |
| 162 | + UnresolvedAccess( |
| 163 | + UnresolvedIdentifier(self).Mixin).unresolved))))) |
| 164 | +resolved=UnresolvedExpression(UnresolvedAccess( |
| 165 | + MixinProto(Mixin).unresolved))*/ |
| 166 | +void mixinConstant16() {} |
| 167 | + |
| 168 | +@Helper(Mixin.unresolved<int>) |
| 169 | +/*member: mixinConstant17: |
| 170 | +unresolved=UnresolvedExpression(UnresolvedInvoke( |
| 171 | + UnresolvedIdentifier(Helper) |
| 172 | + (UnresolvedExpression(UnresolvedInstantiate( |
| 173 | + UnresolvedAccess( |
| 174 | + UnresolvedIdentifier(Mixin).unresolved)<{unresolved-type-annotation:UnresolvedIdentifier(int)}>))))) |
| 175 | +resolved=UnresolvedExpression(UnresolvedInstantiate( |
| 176 | + UnresolvedAccess( |
| 177 | + MixinProto(Mixin).unresolved)<int>))*/ |
| 178 | +void mixinConstant17() {} |
| 179 | + |
| 180 | +@Helper(self.Mixin.unresolved<int>) |
| 181 | +/*member: mixinConstant18: |
| 182 | +unresolved=UnresolvedExpression(UnresolvedInvoke( |
| 183 | + UnresolvedIdentifier(Helper) |
| 184 | + (UnresolvedExpression(UnresolvedInstantiate( |
| 185 | + UnresolvedAccess( |
| 186 | + UnresolvedAccess( |
| 187 | + UnresolvedIdentifier(self).Mixin).unresolved)<{unresolved-type-annotation:UnresolvedIdentifier(int)}>))))) |
| 188 | +resolved=UnresolvedExpression(UnresolvedInstantiate( |
| 189 | + UnresolvedAccess( |
| 190 | + MixinProto(Mixin).unresolved)<int>))*/ |
| 191 | +void mixinConstant18() {} |
0 commit comments