@@ -42,7 +42,6 @@ import '../builder/formal_parameter_builder.dart';
4242import '../builder/invalid_type_builder.dart' ;
4343import '../builder/library_builder.dart' ;
4444import '../builder/metadata_builder.dart' ;
45- import '../builder/mixin_application_builder.dart' ;
4645import '../builder/named_type_builder.dart' ;
4746import '../builder/nullability_builder.dart' ;
4847import '../builder/omitted_type_builder.dart' ;
@@ -1211,7 +1210,7 @@ class OutlineBuilder extends StackListenerImpl {
12111210 assert (checkState (null , [
12121211 /* interfaces */ ValueKinds .TypeBuilderListOrNull ,
12131212 /* mixins */ unionOfKinds ([
1214- ValueKinds .MixinApplicationBuilderOrNull ,
1213+ ValueKinds .TypeBuilderListOrNull ,
12151214 ValueKinds .ParserRecovery ,
12161215 ]),
12171216 /* supertype offset */ ValueKinds .Integer ,
@@ -1226,7 +1225,7 @@ class OutlineBuilder extends StackListenerImpl {
12261225 // give different errors (if, say, one later assigns
12271226 // A to a variable of type B).
12281227 pop (NullValues .TypeBuilderList ); // Interfaces.
1229- pop (NullValues .MixinApplicationBuilder ); // Mixin applications .
1228+ pop (NullValues .TypeBuilderList ); // Mixins .
12301229 pop (); // Supertype offset.
12311230 pop (NullValues .TypeBuilder ); // Supertype.
12321231 }
@@ -1264,7 +1263,7 @@ class OutlineBuilder extends StackListenerImpl {
12641263 assert (checkState (beginToken, [
12651264 /* interfaces */ ValueKinds .TypeBuilderListOrNull ,
12661265 /* mixins */ unionOfKinds ([
1267- ValueKinds .MixinApplicationBuilderOrNull ,
1266+ ValueKinds .TypeBuilderListOrNull ,
12681267 ValueKinds .ParserRecovery ,
12691268 ]),
12701269 /* supertype offset */ ValueKinds .Integer ,
@@ -1280,18 +1279,15 @@ class OutlineBuilder extends StackListenerImpl {
12801279
12811280 List <TypeBuilder >? interfaces =
12821281 pop (NullValues .TypeBuilderList ) as List <TypeBuilder >? ;
1283- MixinApplicationBuilder ? mixinApplication =
1284- nullIfParserRecovery (pop (NullValues .MixinApplicationBuilder ))
1285- as MixinApplicationBuilder ? ;
1282+ List < TypeBuilder > ? mixins =
1283+ nullIfParserRecovery (pop (NullValues .TypeBuilderList ))
1284+ as List < TypeBuilder > ? ;
12861285 int supertypeOffset = popCharOffset ();
12871286 TypeBuilder ? supertype = nullIfParserRecovery (pop ()) as TypeBuilder ? ;
12881287 Modifiers modifiers = pop () as Modifiers ;
12891288 List <NominalParameterBuilder >? typeParameters =
12901289 pop () as List <NominalParameterBuilder >? ;
12911290 Object ? name = pop ();
1292- if (typeParameters != null && mixinApplication != null ) {
1293- mixinApplication.typeParameters = typeParameters;
1294- }
12951291 List <MetadataBuilder >? metadata = pop () as List <MetadataBuilder >? ;
12961292 inAbstractOrSealedClass = false ;
12971293 checkEmpty (beginToken.charOffset);
@@ -1313,8 +1309,7 @@ class OutlineBuilder extends StackListenerImpl {
13131309 uri);
13141310 }
13151311 }
1316- if (mixinApplication != null ) {
1317- List <TypeBuilder >? mixins = mixinApplication.mixins;
1312+ if (mixins != null ) {
13181313 for (TypeBuilder mixin in mixins) {
13191314 if (mixin .nullabilityBuilder.build () == Nullability .nullable) {
13201315 _compilationUnit.addProblem (
@@ -1349,7 +1344,7 @@ class OutlineBuilder extends StackListenerImpl {
13491344 identifier: identifier,
13501345 typeParameters: typeParameters,
13511346 supertype: supertype,
1352- mixins: mixinApplication ,
1347+ mixins: mixins ,
13531348 interfaces: interfaces,
13541349 startOffset: startOffset,
13551350 nameOffset: identifier.nameOffset,
@@ -2245,24 +2240,7 @@ class OutlineBuilder extends StackListenerImpl {
22452240 assert (checkState (withKeyword, [
22462241 /* mixins */ unionOfKinds ([
22472242 ValueKinds .ParserRecovery ,
2248- ValueKinds .TypeBuilderListOrNull ,
2249- ]),
2250- /* supertype */ unionOfKinds ([
2251- ValueKinds .ParserRecovery ,
2252- ValueKinds .TypeBuilder ,
2253- ]),
2254- ]));
2255- Object ? mixins = pop ();
2256- if (mixins is ParserRecovery ) {
2257- push (mixins);
2258- } else {
2259- push (_builderFactory.addMixinApplication (
2260- mixins as List <TypeBuilder >, withKeyword.charOffset));
2261- }
2262- assert (checkState (withKeyword, [
2263- /* mixin application */ unionOfKinds ([
2264- ValueKinds .ParserRecovery ,
2265- ValueKinds .MixinApplicationBuilder ,
2243+ ValueKinds .TypeBuilderList ,
22662244 ]),
22672245 /* supertype */ unionOfKinds ([
22682246 ValueKinds .ParserRecovery ,
@@ -2302,9 +2280,9 @@ class OutlineBuilder extends StackListenerImpl {
23022280 ValueKinds .ParserRecovery ,
23032281 ValueKinds .TypeBuilderListOrNull ,
23042282 ]),
2305- /* mixin application */ unionOfKinds ([
2283+ /* mixins */ unionOfKinds ([
23062284 ValueKinds .ParserRecovery ,
2307- ValueKinds .MixinApplicationBuilder ,
2285+ ValueKinds .TypeBuilderList ,
23082286 ]),
23092287 /* supertype */ unionOfKinds ([
23102288 ValueKinds .ParserRecovery ,
@@ -2334,10 +2312,8 @@ class OutlineBuilder extends StackListenerImpl {
23342312 } else {
23352313 Identifier identifier = name as Identifier ;
23362314 String classNameForErrors = identifier.name;
2337- MixinApplicationBuilder mixinApplicationBuilder =
2338- mixinApplication as MixinApplicationBuilder ;
2339- List <TypeBuilder > mixins = mixinApplicationBuilder.mixins;
2340- if (supertype is TypeBuilder && supertype is ! MixinApplicationBuilder ) {
2315+ List <TypeBuilder > mixins = mixinApplication as List <TypeBuilder >;
2316+ if (supertype is TypeBuilder ) {
23412317 if (supertype.nullabilityBuilder.build () == Nullability .nullable) {
23422318 _compilationUnit.addProblem (
23432319 templateNullableSuperclassError
@@ -2381,7 +2357,7 @@ class OutlineBuilder extends StackListenerImpl {
23812357 typeParameters: typeParameters,
23822358 modifiers: modifiers,
23832359 supertype: supertype as TypeBuilder ? ,
2384- mixinApplication : mixinApplication ,
2360+ mixins : mixins ,
23852361 interfaces: interfaces,
23862362 startOffset: startOffset,
23872363 nameOffset: identifier.nameOffset,
@@ -2781,7 +2757,7 @@ class OutlineBuilder extends StackListenerImpl {
27812757 assert (checkState (enumKeyword, [
27822758 /* interfaces */ ValueKinds .TypeBuilderListOrNull ,
27832759 /* mixins */ unionOfKinds ([
2784- ValueKinds .MixinApplicationBuilderOrNull ,
2760+ ValueKinds .TypeBuilderListOrNull ,
27852761 ValueKinds .ParserRecovery ,
27862762 ]),
27872763 /* type parameters */ ValueKinds .NominalVariableListOrNull ,
@@ -2792,7 +2768,7 @@ class OutlineBuilder extends StackListenerImpl {
27922768 // We pop more values than needed to reach type parameters, offset and name.
27932769 List <TypeBuilder >? interfaces =
27942770 pop (NullValues .TypeBuilderList ) as List <TypeBuilder >? ;
2795- Object ? mixins = pop (NullValues .MixinApplicationBuilder );
2771+ Object ? mixins = pop (NullValues .TypeBuilderList );
27962772 List <NominalParameterBuilder >? typeParameters =
27972773 pop () as List <NominalParameterBuilder >? ;
27982774
@@ -2808,7 +2784,7 @@ class OutlineBuilder extends StackListenerImpl {
28082784 _builderFactory.beginEnumBody ();
28092785
28102786 push (typeParameters ?? NullValues .NominalParameters );
2811- push (mixins ?? NullValues .MixinApplicationBuilder );
2787+ push (mixins ?? NullValues .TypeBuilderList );
28122788 push (interfaces ?? NullValues .TypeBuilderList );
28132789
28142790 push (leftBrace.endGroup! .charOffset); // end char offset.
@@ -2836,7 +2812,7 @@ class OutlineBuilder extends StackListenerImpl {
28362812 /* endCharOffset */ ValueKinds .Integer ,
28372813 /* interfaces */ ValueKinds .TypeBuilderListOrNull ,
28382814 /* mixins */ unionOfKinds ([
2839- ValueKinds .MixinApplicationBuilderOrNull ,
2815+ ValueKinds .TypeBuilderListOrNull ,
28402816 ValueKinds .ParserRecovery ,
28412817 ]),
28422818 /* type parameters */ ValueKinds .NominalVariableListOrNull ,
@@ -2872,8 +2848,8 @@ class OutlineBuilder extends StackListenerImpl {
28722848
28732849 List <TypeBuilder >? interfaces =
28742850 nullIfParserRecovery (pop ()) as List <TypeBuilder >? ;
2875- MixinApplicationBuilder ? mixinBuilder =
2876- nullIfParserRecovery (pop ()) as MixinApplicationBuilder ? ;
2851+ List < TypeBuilder > ? mixins =
2852+ nullIfParserRecovery (pop ()) as List < TypeBuilder > ? ;
28772853 List <NominalParameterBuilder >? typeParameters =
28782854 pop () as List <NominalParameterBuilder >? ;
28792855 Object ? identifier = pop ();
@@ -2906,8 +2882,8 @@ class OutlineBuilder extends StackListenerImpl {
29062882 metadata: metadata,
29072883 identifier: identifier,
29082884 typeParameters: typeParameters,
2909- supertypeBuilder : mixinBuilder ,
2910- interfaceBuilders : interfaces,
2885+ mixins : mixins ,
2886+ interfaces : interfaces,
29112887 startOffset: startOffset,
29122888 endOffset: endOffset);
29132889 } else {
@@ -3804,12 +3780,11 @@ class OutlineBuilder extends StackListenerImpl {
38043780 if (supertype is ParserRecovery || mixins is ParserRecovery ) {
38053781 push (new ParserRecovery (withKeyword.charOffset));
38063782 } else {
3807- push (_builderFactory.addMixinApplication (
3808- mixins as List <TypeBuilder >, withKeyword.charOffset));
3783+ push (mixins);
38093784 }
38103785 assert (checkState (withKeyword, [
38113786 /* mixins */ unionOfKinds ([
3812- ValueKinds .MixinApplicationBuilderOrNull ,
3787+ ValueKinds .TypeBuilderListOrNull ,
38133788 ValueKinds .ParserRecovery ,
38143789 ]),
38153790 /* supertype offset */ ValueKinds .Integer ,
@@ -3830,9 +3805,9 @@ class OutlineBuilder extends StackListenerImpl {
38303805 ValueKinds .ParserRecovery ,
38313806 ]),
38323807 ]));
3833- push (NullValues .MixinApplicationBuilder );
3808+ push (NullValues .TypeBuilderList );
38343809 assert (checkState (null , [
3835- /* mixins */ ValueKinds .MixinApplicationBuilderOrNull ,
3810+ /* mixins */ ValueKinds .TypeBuilderListOrNull ,
38363811 /* supertype offset */ ValueKinds .Integer ,
38373812 /* supertype */ unionOfKinds ([
38383813 ValueKinds .TypeBuilderOrNull ,
@@ -3858,12 +3833,11 @@ class OutlineBuilder extends StackListenerImpl {
38583833 if (mixins is ParserRecovery ) {
38593834 push (new ParserRecovery (withKeyword.charOffset));
38603835 } else {
3861- push (_builderFactory.addMixinApplication (
3862- mixins as List <TypeBuilder >, withKeyword.charOffset));
3836+ push (mixins);
38633837 }
38643838 assert (checkState (withKeyword, [
38653839 /* mixins */ unionOfKinds ([
3866- ValueKinds .MixinApplicationBuilderOrNull ,
3840+ ValueKinds .TypeBuilderListOrNull ,
38673841 ValueKinds .ParserRecovery ,
38683842 ]),
38693843 ]));
@@ -3872,7 +3846,7 @@ class OutlineBuilder extends StackListenerImpl {
38723846 @override
38733847 void handleEnumNoWithClause () {
38743848 debugEvent ("EnumNoWithClause" );
3875- push (NullValues .MixinApplicationBuilder );
3849+ push (NullValues .TypeBuilderList );
38763850 }
38773851
38783852 @override
0 commit comments