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

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

Issue 10830303: Refactor Library/CompilationUnit and how we define local Scope. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Fix reference in dart2js_mirror.dart 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 32fb20465b7abbe712d85c8c3102b23af36b53fe..c1f5bc1dace78179d6b0eb2197d2ead262f2a575 100644
--- a/lib/compiler/implementation/resolver.dart
+++ b/lib/compiler/implementation/resolver.dart
@@ -1905,10 +1905,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);

Powered by Google App Engine
This is Rietveld 408576698