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

Unified Diff: pkg/front_end/lib/src/fasta/kernel/kernel_target.dart

Issue 2689303003: Implement type variables in mixin applications. (Closed)
Patch Set: Restore duplication handling and set mixedInType. Created 3 years, 10 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: pkg/front_end/lib/src/fasta/kernel/kernel_target.dart
diff --git a/pkg/front_end/lib/src/fasta/kernel/kernel_target.dart b/pkg/front_end/lib/src/fasta/kernel/kernel_target.dart
index 8704e05e34da78ca963c71eaf574f9380abb4cb5..f70e50d2d2e01af2c1ca7aba529332d921f2ce95 100644
--- a/pkg/front_end/lib/src/fasta/kernel/kernel_target.dart
+++ b/pkg/front_end/lib/src/fasta/kernel/kernel_target.dart
@@ -344,6 +344,9 @@ class KernelTarget extends TargetImplementation {
if (cls != objectClass) {
cls.supertype ??= objectClass.asRawSupertype;
}
+ if (builder.isMixinApplication) {
+ cls.mixedInType = builder.mixedInType.buildSupertype();
+ }
}
ticker.logMs("Installed Object as implicit superclass");
}
@@ -366,7 +369,7 @@ class KernelTarget extends TargetImplementation {
/// If [builder] doesn't have a constructors, install the defaults.
void installDefaultConstructor(SourceClassBuilder builder) {
- if (!builder.constructors.isEmpty) return;
+ if (builder.isMixinApplication || !builder.constructors.isEmpty) return;
karlklose 2017/02/15 09:09:30 Old code, but how about .isNotEmpty?
ahe 2017/02/15 09:36:50 Done.
/// Quotes below are from [Dart Programming Language Specification, 4th
/// Edition](http://www.ecma-international.org/publications/files/ECMA-ST/ECMA-408.pdf):
if (builder is NamedMixinApplicationBuilder) {

Powered by Google App Engine
This is Rietveld 408576698