[cfe] Set named mixin application flag on DillClassBuilder.

The flag is needed by the class hierarchy builder to properly handle
using named mixin application classes as mixins.

Exposed by this: https://dart-review.googlesource.com/c/sdk/+/114560

Fixes https://github.com/dart-lang/sdk/issues/38004

Change-Id: I38dd7129527bbdf12027233161b8939546a4968e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/115218
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Aske Simon Christensen <askesc@google.com>
This commit is contained in:
Aske Simon Christensen 2019-09-03 12:38:23 +00:00 committed by commit-bot@chromium.org
parent 72e8bdc56b
commit f5839de1ec

View file

@ -18,7 +18,7 @@ import '../kernel/kernel_builder.dart'
Scope,
TypeVariableBuilder;
import '../modifier.dart' show abstractMask;
import '../modifier.dart' show abstractMask, namedMixinApplicationMask;
import 'dill_library_builder.dart' show DillLibraryBuilder;
@ -142,7 +142,14 @@ class DillClassBuilder extends ClassBuilder {
}
int computeModifiers(Class cls) {
return cls.isAbstract ? abstractMask : 0;
int modifiers = 0;
if (cls.isAbstract) {
modifiers |= abstractMask;
}
if (cls.isMixinApplication && cls.name != null) {
modifiers |= namedMixinApplicationMask;
}
return modifiers;
}
TypeBuilder computeTypeBuilder(