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

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

Issue 2934333002: More dart2js strong mode cleanup. (Closed)
Patch Set: Created 3 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
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; 5 library dart2js.resolution;
6 6
7 import 'dart:collection' show Queue; 7 import 'dart:collection' show Queue;
8 8
9 import '../common.dart'; 9 import '../common.dart';
10 import '../common/names.dart' show Identifiers; 10 import '../common/names.dart' show Identifiers;
(...skipping 756 matching lines...) Expand 10 before | Expand all | Expand 10 after
767 return; 767 return;
768 } 768 }
769 769
770 // Check that the mixed in class has Object as its superclass. 770 // Check that the mixed in class has Object as its superclass.
771 if (!mixin.superclass.isObject) { 771 if (!mixin.superclass.isObject) {
772 reporter.reportErrorMessage(mixin, MessageKind.ILLEGAL_MIXIN_SUPERCLASS); 772 reporter.reportErrorMessage(mixin, MessageKind.ILLEGAL_MIXIN_SUPERCLASS);
773 } 773 }
774 774
775 // Check that the mixed in class doesn't have any constructors and 775 // Check that the mixed in class doesn't have any constructors and
776 // make sure we aren't mixing in methods that use 'super'. 776 // make sure we aren't mixing in methods that use 'super'.
777 mixin.forEachLocalMember((AstElement member) { 777 mixin.forEachLocalMember((_member) {
778 AstElement member = _member;
778 if (member.isGenerativeConstructor && !member.isSynthesized) { 779 if (member.isGenerativeConstructor && !member.isSynthesized) {
779 reporter.reportErrorMessage( 780 reporter.reportErrorMessage(
780 member, MessageKind.ILLEGAL_MIXIN_CONSTRUCTOR); 781 member, MessageKind.ILLEGAL_MIXIN_CONSTRUCTOR);
781 } else { 782 } else {
782 // Get the resolution tree and check that the resolved member 783 // Get the resolution tree and check that the resolved member
783 // doesn't use 'super'. This is the part of the 'super' mixin 784 // doesn't use 'super'. This is the part of the 'super' mixin
784 // check that happens when a function is resolved before the 785 // check that happens when a function is resolved before the
785 // mixin application has been performed. 786 // mixin application has been performed.
786 // TODO(johnniwinther): Obtain the [TreeElements] for [member] 787 // TODO(johnniwinther): Obtain the [TreeElements] for [member]
787 // differently. 788 // differently.
(...skipping 374 matching lines...) Expand 10 before | Expand all | Expand 10 after
1162 TreeElements get treeElements { 1163 TreeElements get treeElements {
1163 assert(_treeElements != null, 1164 assert(_treeElements != null,
1164 failedAt(this, "TreeElements have not been computed for $this.")); 1165 failedAt(this, "TreeElements have not been computed for $this."));
1165 return _treeElements; 1166 return _treeElements;
1166 } 1167 }
1167 1168
1168 void reuseElement() { 1169 void reuseElement() {
1169 _treeElements = null; 1170 _treeElements = null;
1170 } 1171 }
1171 } 1172 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698