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

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: 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 246a546edf7ae8b40d13e80b57ae7a63b3775156..e2fc4caf9ac7aa7ad1df01a6864cbbca27594f41 100644
--- a/lib/compiler/implementation/resolver.dart
+++ b/lib/compiler/implementation/resolver.dart
@@ -1875,10 +1875,11 @@ class ClassResolverVisitor extends TypeDefinitionVisitor {
* constructors.
*/
void addDefaultConstructorIfNeeded(ClassElement element) {
- if (element.constructors.length != 0) return;
+ //if (element.constructors.length != 0) return;
Lasse Reichstein Nielsen 2012/08/08 14:22:12 Remove commented code.
Anders Johnsen 2012/08/08 17:30:37 Done.
+ 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