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

Side by Side Diff: dart/lib/compiler/implementation/resolver.dart

Issue 10539107: Disable assertion that no longer holds. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 years, 6 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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 interface TreeElements { 5 interface TreeElements {
6 Element operator[](Node node); 6 Element operator[](Node node);
7 Selector getSelector(Send send); 7 Selector getSelector(Send send);
8 Type getType(TypeAnnotation annotation); 8 Type getType(TypeAnnotation annotation);
9 } 9 }
10 10
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
149 } 149 }
150 if (isConstructor) { 150 if (isConstructor) {
151 constructorElements[element] = visitor.mapping; 151 constructorElements[element] = visitor.mapping;
152 } 152 }
153 return visitor.mapping; 153 return visitor.mapping;
154 }); 154 });
155 } 155 }
156 156
157 void resolveConstructorImplementation(FunctionElement constructor, 157 void resolveConstructorImplementation(FunctionElement constructor,
158 FunctionExpression node) { 158 FunctionExpression node) {
159 assert(constructor.defaultImplementation === constructor); 159 if (constructor.defaultImplementation !== constructor) return;
160 ClassElement intrface = constructor.enclosingElement; 160 ClassElement intrface = constructor.enclosingElement;
161 if (!intrface.isInterface()) return; 161 if (!intrface.isInterface()) return;
162 Type defaultType = intrface.defaultClass; 162 Type defaultType = intrface.defaultClass;
163 if (defaultType === null) { 163 if (defaultType === null) {
164 error(node, MessageKind.NO_DEFAULT_CLASS, [intrface.name]); 164 error(node, MessageKind.NO_DEFAULT_CLASS, [intrface.name]);
165 } 165 }
166 ClassElement defaultClass = defaultType.element; 166 ClassElement defaultClass = defaultType.element;
167 defaultClass.ensureResolved(compiler); 167 defaultClass.ensureResolved(compiler);
168 if (defaultClass.isInterface()) { 168 if (defaultClass.isInterface()) {
169 error(node, MessageKind.CANNOT_INSTANTIATE_INTERFACE, 169 error(node, MessageKind.CANNOT_INSTANTIATE_INTERFACE,
(...skipping 1923 matching lines...) Expand 10 before | Expand all | Expand 10 after
2093 2093
2094 TopScope(LibraryElement library) : super(null, library); 2094 TopScope(LibraryElement library) : super(null, library);
2095 Element lookup(SourceString name) { 2095 Element lookup(SourceString name) {
2096 return library.find(name); 2096 return library.find(name);
2097 } 2097 }
2098 2098
2099 Element add(Element newElement) { 2099 Element add(Element newElement) {
2100 throw "Cannot add an element in the top scope"; 2100 throw "Cannot add an element in the top scope";
2101 } 2101 }
2102 } 2102 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698