Skip to content

Commit 41e888a

Browse files
pqCommit Queue
authored andcommitted
[element model] migrate type_constraint_gatherer_test
Change-Id: I01708c6e7e8b2e87b9f906ed13b6e94ba6511d62 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/405603 Reviewed-by: Konstantin Shcheglov <[email protected]> Commit-Queue: Phil Quitslund <[email protected]>
1 parent d589046 commit 41e888a

File tree

2 files changed

+181
-164
lines changed

2 files changed

+181
-164
lines changed

pkg/analyzer/test/generated/elements_types_mixin.dart

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,6 @@ mixin ElementsTypesMixin {
120120
TypeImpl get unknownInferredType => UnknownInferredType.instance;
121121

122122
VoidTypeImpl get voidNone => VoidTypeImpl.instance;
123-
124123
ClassElementImpl class_({
125124
required String name,
126125
bool isAbstract = false,
@@ -151,6 +150,31 @@ mixin ElementsTypesMixin {
151150
return fragment;
152151
}
153152

153+
ClassElementImpl class_2({
154+
required String name,
155+
bool isAbstract = false,
156+
bool isAugmentation = false,
157+
bool isSealed = false,
158+
InterfaceType? superType,
159+
List<TypeParameterElement2> typeParameters = const [],
160+
List<InterfaceType> interfaces = const [],
161+
List<InterfaceType> mixins = const [],
162+
List<MethodElementImpl> methods = const [],
163+
}) {
164+
return class_(
165+
name: name,
166+
isAbstract: isAbstract,
167+
isAugmentation: isAugmentation,
168+
isSealed: isSealed,
169+
superType: superType,
170+
typeParameters: typeParameters
171+
.map((e) => e.asElement as TypeParameterElementImpl)
172+
.toList(),
173+
interfaces: interfaces,
174+
mixins: mixins,
175+
methods: methods);
176+
}
177+
154178
InterfaceTypeImpl comparableNone(DartType type) {
155179
var coreLibrary = typeProvider.intElement.library;
156180
var element = coreLibrary.getClass('Comparable')!;

0 commit comments

Comments
 (0)