mirror of
https://github.com/dart-lang/sdk
synced 2024-10-06 13:08:01 +00:00
Remove a few 'is! MixinElement'.
MixinElement does not implement ClassElement anymore. Change-Id: I0c05f8720b202ad79f3105a4638d8d3d4ff7a404 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/265403 Reviewed-by: Samuel Rawlins <srawlins@google.com> Commit-Queue: Konstantin Shcheglov <scheglov@google.com> Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
This commit is contained in:
parent
8d925319ca
commit
e46bade3d0
|
@ -682,8 +682,7 @@ class ClassElementImpl extends ClassOrMixinElementImpl implements ClassElement {
|
|||
|
||||
bool get isEnumLike {
|
||||
// Must be a concrete class.
|
||||
// TODO(scheglov) `is MixinElement` after the separation.
|
||||
if (isAbstract || this is MixinElement) {
|
||||
if (isAbstract) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
@ -907,10 +907,7 @@ class InheritanceManager3 {
|
|||
|
||||
static bool _isDeclaredInObject(ExecutableElement element) {
|
||||
var enclosing = element.enclosingElement;
|
||||
// TODO(scheglov) `is! MixinElement` after the separation.
|
||||
return enclosing is InterfaceElement &&
|
||||
enclosing.supertype == null &&
|
||||
enclosing is! MixinElement;
|
||||
return enclosing is ClassElement && enclosing.isDartCoreObject;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -2208,9 +2208,7 @@ class ErrorVerifier extends RecursiveAstVisitor<void>
|
|||
NamedType namedType,
|
||||
InterfaceType type) {
|
||||
final element = type.element;
|
||||
if (element is! MixinElement &&
|
||||
element is ClassElement &&
|
||||
element.isAbstract) {
|
||||
if (element is ClassElement && element.isAbstract) {
|
||||
var element = expression.constructorName.staticElement;
|
||||
if (element != null && !element.isFactory) {
|
||||
bool isImplicit =
|
||||
|
|
|
@ -291,8 +291,7 @@ class _ElementWriter {
|
|||
|
||||
void _writeClassElement(InterfaceElement e) {
|
||||
_writeIndentedLine(() {
|
||||
// TODO(scheglov) `is! MixinElement` after the separation.
|
||||
if (e is ClassElement && e is! MixinElement) {
|
||||
if (e is ClassElement) {
|
||||
_writeIf(e.isAbstract, 'abstract ');
|
||||
_writeIf(e.isMacro, 'macro ');
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue