Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(948)

Unified Diff: sdk/lib/_internal/compiler/implementation/native_handler.dart

Issue 12051056: Allow native classes to mixin behavior from an ordinary Dart class. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Refactor. Created 7 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: sdk/lib/_internal/compiler/implementation/native_handler.dart
diff --git a/sdk/lib/_internal/compiler/implementation/native_handler.dart b/sdk/lib/_internal/compiler/implementation/native_handler.dart
index f0c82013a66f3118a424fe816480dfbae1461e03..e3e7bbe1319bfab8cd6233c16c7b014333cec8f1 100644
--- a/sdk/lib/_internal/compiler/implementation/native_handler.dart
+++ b/sdk/lib/_internal/compiler/implementation/native_handler.dart
@@ -437,8 +437,14 @@ class NativeCodegenEnqueuer extends NativeEnqueuerBase {
subtypes.add(cls);
}
+ ClassElement superclass = cls.superclass;
ngeoffray 2013/01/24 11:55:53 Please add a comment here.
+ while (superclass != null && superclass.isMixinApplication) {
+ assert(!superclass.isNative());
+ superclass = superclass.superclass;
+ }
+
List<Element> directSubtypes = emitter.directSubtypes.putIfAbsent(
- cls.superclass,
+ superclass,
() => <ClassElement>[]);
directSubtypes.add(cls);
}

Powered by Google App Engine
This is Rietveld 408576698