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

Unified Diff: lib/compiler/implementation/resolver.dart

Issue 10832203: Refactor Library/CompilationUnit and how we define local Scope. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Rebase and refactor ClassElement.constructors. Created 8 years, 4 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: lib/compiler/implementation/resolver.dart
diff --git a/lib/compiler/implementation/resolver.dart b/lib/compiler/implementation/resolver.dart
index e8a31ab6bedc4d9acf0b7a8c9eec15f06d9910b2..a8efdbac7a8584f35048240a0b1c38baebdb2527 100644
--- a/lib/compiler/implementation/resolver.dart
+++ b/lib/compiler/implementation/resolver.dart
@@ -1884,10 +1884,10 @@ class ClassResolverVisitor extends TypeDefinitionVisitor {
* constructors.
*/
void addDefaultConstructorIfNeeded(ClassElement element) {
- if (element.constructors.length != 0) return;
+ if (element.hasConstructor) return;
SynthesizedConstructorElement constructor =
new SynthesizedConstructorElement(element);
- element.constructors[element.name] = constructor;
+ element.addToScope(constructor, compiler);
Type returnType = compiler.types.voidType;
constructor.type = new FunctionType(returnType, const EmptyLink<Type>(),
constructor);
« no previous file with comments | « lib/compiler/implementation/patch_parser.dart ('k') | lib/compiler/implementation/scanner/class_element_parser.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698