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

Side by Side Diff: dart/pkg/compiler/lib/src/resolution/class_members.dart

Issue 811933004: Update invariant in class_members.dart. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 5 years, 11 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 library resolution.compute_members; 5 library resolution.compute_members;
6 6
7 import '../elements/elements.dart' 7 import '../elements/elements.dart'
8 show Element, 8 show Element,
9 Name, 9 Name,
10 PublicName, 10 PublicName,
(...skipping 350 matching lines...) Expand 10 before | Expand all | Expand 10 after
361 inherited.element, MessageKind.NO_STATIC_OVERRIDE, () { 361 inherited.element, MessageKind.NO_STATIC_OVERRIDE, () {
362 reportErrorWithContext( 362 reportErrorWithContext(
363 declared.element, MessageKind.NO_STATIC_OVERRIDE, 363 declared.element, MessageKind.NO_STATIC_OVERRIDE,
364 inherited.element, MessageKind.NO_STATIC_OVERRIDE_CONT); 364 inherited.element, MessageKind.NO_STATIC_OVERRIDE_CONT);
365 }); 365 });
366 } 366 }
367 } 367 }
368 368
369 DartType declaredType = declared.functionType; 369 DartType declaredType = declared.functionType;
370 for (Member inherited in superMember.declarations) { 370 for (Member inherited in superMember.declarations) {
371 if (cls == inherited.declarer.element) { 371 if (inherited.element == declared.element) {
372 // TODO(ahe): For some reason, "call" elements are repeated in
373 // superMember.declarations. Investigate why.
374 } else if (cls == inherited.declarer.element) {
372 // An error should already have been reported. 375 // An error should already have been reported.
373 assert(invariant(declared.element, compiler.compilationFailed)); 376 assert(invariant(declared.element, compiler.compilationFailed));
374 continue; 377 continue;
375 } 378 }
376 379
377 void reportError(MessageKind errorKind, MessageKind infoKind) { 380 void reportError(MessageKind errorKind, MessageKind infoKind) {
378 reportMessage( 381 reportMessage(
379 inherited.element, MessageKind.INVALID_OVERRIDE_METHOD, () { 382 inherited.element, MessageKind.INVALID_OVERRIDE_METHOD, () {
380 compiler.reportError(declared.element, errorKind, 383 compiler.reportError(declared.element, errorKind,
381 {'name': declared.name.text, 384 {'name': declared.name.text,
(...skipping 519 matching lines...) Expand 10 before | Expand all | Expand 10 after
901 message: "Members have not been fully computed for $this.")); 904 message: "Members have not been fully computed for $this."));
902 if (interfaceMembersAreClassMembers) { 905 if (interfaceMembersAreClassMembers) {
903 classMembers.forEach((_, member) { 906 classMembers.forEach((_, member) {
904 if (!member.isStatic) f(member); 907 if (!member.isStatic) f(member);
905 }); 908 });
906 } else { 909 } else {
907 interfaceMembers.forEach((_, member) => f(member)); 910 interfaceMembers.forEach((_, member) => f(member));
908 } 911 }
909 } 912 }
910 } 913 }
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