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

Side by Side Diff: pkg/front_end/lib/src/fasta/builder/class_builder.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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 library fasta.class_builder; 5 library fasta.class_builder;
6 6
7 import 'builder.dart' show 7 import 'builder.dart' show
8 Builder, 8 Builder,
9 ConstructorReferenceBuilder, 9 ConstructorReferenceBuilder,
10 LibraryBuilder, 10 LibraryBuilder,
(...skipping 15 matching lines...) Expand all
26 List<T> interfaces; 26 List<T> interfaces;
27 27
28 final Map<String, Builder> members; 28 final Map<String, Builder> members;
29 29
30 ClassBuilder( 30 ClassBuilder(
31 List<MetadataBuilder> metadata, int modifiers, 31 List<MetadataBuilder> metadata, int modifiers,
32 String name, this.typeVariables, this.supertype, this.interfaces, 32 String name, this.typeVariables, this.supertype, this.interfaces,
33 this.members, LibraryBuilder parent, int charOffset) 33 this.members, LibraryBuilder parent, int charOffset)
34 : super(metadata, modifiers, name, parent, charOffset); 34 : super(metadata, modifiers, name, parent, charOffset);
35 35
36 /// Returns true if this class is the result of applying a mixin to its
37 /// superclass.
38 bool get isMixinApplication => mixedInType != null;
39
40 T get mixedInType;
41
36 List<ConstructorReferenceBuilder> get constructorReferences => null; 42 List<ConstructorReferenceBuilder> get constructorReferences => null;
37 43
38 Map<String, Builder> get constructors; 44 Map<String, Builder> get constructors;
39 45
40 Map<String, Builder> get membersInScope => members; 46 Map<String, Builder> get membersInScope => members;
41 47
42 int resolveConstructors(LibraryBuilder library) { 48 int resolveConstructors(LibraryBuilder library) {
43 if (constructorReferences == null) return 0; 49 if (constructorReferences == null) return 0;
44 Scope scope = computeInstanceScope(library.scope); 50 Scope scope = computeInstanceScope(library.scope);
45 for (ConstructorReferenceBuilder ref in constructorReferences) { 51 for (ConstructorReferenceBuilder ref in constructorReferences) {
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 return null; 89 return null;
84 } else if (isSetter && builder.isGetter) { 90 } else if (isSetter && builder.isGetter) {
85 return null; 91 return null;
86 } else { 92 } else {
87 return builder.isInstanceMember ? null : builder; 93 return builder.isInstanceMember ? null : builder;
88 } 94 }
89 } 95 }
90 96
91 Builder findConstructorOrFactory(String name); 97 Builder findConstructorOrFactory(String name);
92 } 98 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698