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

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

Issue 1323573002: Prepare for computation of NewStructure in Resolution. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 5 years, 3 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
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 dart2js.resolution.compute_members; 5 library dart2js.resolution.compute_members;
6 6
7 import '../common/names.dart' show 7 import '../common/names.dart' show
8 Identifiers; 8 Identifiers;
9 import '../compiler.dart' show 9 import '../compiler.dart' show
10 Compiler, 10 Compiler,
(...skipping 360 matching lines...) Expand 10 before | Expand all | Expand 10 after
371 } 371 }
372 } 372 }
373 373
374 DartType declaredType = declared.functionType; 374 DartType declaredType = declared.functionType;
375 for (Member inherited in superMember.declarations) { 375 for (Member inherited in superMember.declarations) {
376 if (inherited.element == declared.element) { 376 if (inherited.element == declared.element) {
377 // TODO(ahe): For some reason, "call" elements are repeated in 377 // TODO(ahe): For some reason, "call" elements are repeated in
378 // superMember.declarations. Investigate why. 378 // superMember.declarations. Investigate why.
379 } else if (cls == inherited.declarer.element) { 379 } else if (cls == inherited.declarer.element) {
380 // An error should already have been reported. 380 // An error should already have been reported.
381 assert(invariant(declared.element, compiler.compilationFailed)); 381 assert(invariant(declared.element, compiler.compilationFailed,
382 message: "Member $inherited inherited from its "
383 "declaring class: ${cls}."));
Siggi Cherem (dart-lang) 2015/09/01 20:13:40 Not sure I follow the message, does this indicate
382 continue; 384 continue;
383 } 385 }
384 386
385 void reportError(MessageKind errorKind, MessageKind infoKind) { 387 void reportError(MessageKind errorKind, MessageKind infoKind) {
386 reportMessage( 388 reportMessage(
387 inherited.element, MessageKind.INVALID_OVERRIDE_METHOD, () { 389 inherited.element, MessageKind.INVALID_OVERRIDE_METHOD, () {
388 compiler.reportError(declared.element, errorKind, 390 compiler.reportError(declared.element, errorKind,
389 {'name': declared.name.text, 391 {'name': declared.name.text,
390 'class': cls.thisType, 392 'class': cls.thisType,
391 'inheritedClass': inherited.declarer}); 393 'inheritedClass': inherited.declarer});
(...skipping 517 matching lines...) Expand 10 before | Expand all | Expand 10 after
909 message: "Members have not been fully computed for $this.")); 911 message: "Members have not been fully computed for $this."));
910 if (interfaceMembersAreClassMembers) { 912 if (interfaceMembersAreClassMembers) {
911 classMembers.forEach((_, member) { 913 classMembers.forEach((_, member) {
912 if (!member.isStatic) f(member); 914 if (!member.isStatic) f(member);
913 }); 915 });
914 } else { 916 } else {
915 interfaceMembers.forEach((_, member) => f(member)); 917 interfaceMembers.forEach((_, member) => f(member));
916 } 918 }
917 } 919 }
918 } 920 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698