[dartdevc] enable super mixin support in Kernel backend

Change-Id: If2a1c4ec8328080a890e7f22b657b19af4fe53ae
Reviewed-on: https://dart-review.googlesource.com/75791
Reviewed-by: Vijay Menon <vsm@google.com>
Commit-Queue: Jenny Messerly <jmesserly@google.com>
diff --git a/pkg/dev_compiler/lib/src/kernel/compiler.dart b/pkg/dev_compiler/lib/src/kernel/compiler.dart
index 970cc7a..5d1aa99 100644
--- a/pkg/dev_compiler/lib/src/kernel/compiler.dart
+++ b/pkg/dev_compiler/lib/src/kernel/compiler.dart
@@ -559,7 +559,7 @@
     _emitVirtualFieldSymbols(c, body);
     _emitClassSignature(c, className, body);
     _initExtensionSymbols(c);
-    if (!isMixinDeclaration(c)) {
+    if (!c.isMixinDeclaration) {
       _defineExtensionMembers(className, body);
     }
     _emitClassMetadata(c.annotations, className, body);
@@ -863,7 +863,7 @@
       baseClass = mixinId;
     }
 
-    if (isMixinDeclaration(c)) {
+    if (c.isMixinDeclaration) {
       _emitMixinStatement(c, className, baseClass, methods, body);
     } else {
       body.add(_emitClassStatement(c, className, baseClass, methods));
diff --git a/pkg/dev_compiler/lib/src/kernel/kernel_helpers.dart b/pkg/dev_compiler/lib/src/kernel/kernel_helpers.dart
index 7d1beb2..27b4e85 100644
--- a/pkg/dev_compiler/lib/src/kernel/kernel_helpers.dart
+++ b/pkg/dev_compiler/lib/src/kernel/kernel_helpers.dart
@@ -234,6 +234,3 @@
   }
   return sc;
 }
-
-// TODO(jmesserly): replace with a flag on Class once Kernel supports it.
-bool isMixinDeclaration(Class c) => false;
diff --git a/tests/language_2/language_2_dartdevc.status b/tests/language_2/language_2_dartdevc.status
index 1517e85..2f65cbb 100644
--- a/tests/language_2/language_2_dartdevc.status
+++ b/tests/language_2/language_2_dartdevc.status
@@ -315,7 +315,22 @@
 map_literal3_test/01: MissingCompileTimeError
 map_literal3_test/02: MissingCompileTimeError
 map_literal3_test/03: MissingCompileTimeError
-mixin_declaration/*: Skip # need flag on Kernel Class nodes.
+mixin_declaration/mixin_declaration_inference_invalid_05_test: MissingCompileTimeError, Crash # https://github.com/dart-lang/sdk/issues/34165
+mixin_declaration/mixin_declaration_inference_invalid_07_test: MissingCompileTimeError # https://github.com/dart-lang/sdk/issues/34165
+mixin_declaration/mixin_declaration_inference_invalid_10_test: MissingCompileTimeError, Crash # https://github.com/dart-lang/sdk/issues/34165
+mixin_declaration/mixin_declaration_invalid_application_supertype_test/03: MissingCompileTimeError
+mixin_declaration/mixin_declaration_invalid_application_supertype_test/04: MissingCompileTimeError
+mixin_declaration/mixin_declaration_invalid_application_supertype_test/05: MissingCompileTimeError
+mixin_declaration/mixin_declaration_invalid_override_test/06: MissingCompileTimeError
+mixin_declaration/mixin_declaration_invalid_override_test/07: MissingCompileTimeError
+mixin_declaration/mixin_declaration_invalid_override_test/08: MissingCompileTimeError
+mixin_declaration/mixin_declaration_invalid_superinvocation_test/10: CompileTimeError
+mixin_declaration/mixin_declaration_invalid_superinvocation_test/none: CompileTimeError
+mixin_declaration/mixin_declaration_invalid_syntax_test/none: CompileTimeError
+mixin_declaration/mixin_declaration_invalid_usage_test/03: MissingCompileTimeError
+mixin_declaration/mixin_declaration_superinvocation_application_test/04: MissingCompileTimeError
+mixin_declaration/mixin_declaration_superinvocation_application_test/05: MissingCompileTimeError
+mixin_declaration/mixin_declaration_supertype_compatible_test/none: CompileTimeError
 mixin_illegal_super_use_test/01: MissingCompileTimeError
 mixin_illegal_super_use_test/04: MissingCompileTimeError
 mixin_illegal_super_use_test/07: MissingCompileTimeError
diff --git a/tests/language_2/language_2_kernel.status b/tests/language_2/language_2_kernel.status
index 486a022..583cd3c 100644
--- a/tests/language_2/language_2_kernel.status
+++ b/tests/language_2/language_2_kernel.status
@@ -95,7 +95,6 @@
 mixin_declaration/mixin_declaration_invalid_usage_test/03: MissingCompileTimeError
 mixin_declaration/mixin_declaration_superinvocation_application_test/none: CompileTimeError
 mixin_declaration/mixin_declaration_supertype_compatible_test/none: CompileTimeError
-mixin_declaration/mixin_declaration_syntax_test: CompileTimeError
 mixin_illegal_super_use_test/01: MissingCompileTimeError
 mixin_illegal_super_use_test/04: MissingCompileTimeError
 mixin_illegal_super_use_test/07: MissingCompileTimeError
@@ -219,7 +218,6 @@
 mixin_declaration/mixin_declaration_invalid_usage_test/03: MissingCompileTimeError
 mixin_declaration/mixin_declaration_superinvocation_application_test/none: CompileTimeError
 mixin_declaration/mixin_declaration_supertype_compatible_test/none: CompileTimeError
-mixin_declaration/mixin_declaration_syntax_test: CompileTimeError
 vm/regress_33469_test/01: MissingCompileTimeError
 vm/regress_33469_test/02: MissingCompileTimeError
 vm/regress_33469_test/03: MissingCompileTimeError
@@ -2128,4 +2126,3 @@
 mixin_declaration/mixin_declaration_invalid_usage_test/03: MissingCompileTimeError
 mixin_declaration/mixin_declaration_superinvocation_application_test/none: CompileTimeError
 mixin_declaration/mixin_declaration_supertype_compatible_test/none: CompileTimeError
-mixin_declaration/mixin_declaration_syntax_test: CompileTimeError
diff --git a/tests/language_2/mixin_declaration/mixin_declaration_syntax_test.dart b/tests/language_2/mixin_declaration/mixin_declaration_syntax_test.dart
index 6159af9..b87284a 100644
--- a/tests/language_2/mixin_declaration/mixin_declaration_syntax_test.dart
+++ b/tests/language_2/mixin_declaration/mixin_declaration_syntax_test.dart
@@ -222,7 +222,7 @@
   }
 
   {
-    for (var o in [CBaM(), CBaM_2()]) {
+    for (dynamic o in [CBaM(), CBaM_2()]) {
       Expect.type<B>(o);
       Expect.type<M>(o);
       Expect.equals("?&M", "$o");
@@ -241,7 +241,7 @@
   }
 
   {
-    for (var o in [CBaMO(), CBaMO_2()]) {
+    for (dynamic o in [CBaMO(), CBaMO_2()]) {
       Expect.type<B>(o);
       Expect.type<MO>(o);
       Expect.equals("B&MO", "$o");
@@ -288,7 +288,7 @@
   }
 
   {
-    for (var o in [CBaMA(), CBaMA_2()]) {
+    for (dynamic o in [CBaMA(), CBaMA_2()]) {
       Expect.type<B>(o);
       Expect.type<MA>(o);
       Expect.equals("B&MA", "$o");