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

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

Issue 898703004: Fix async_test problems. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 10 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 | pkg/compiler/lib/src/warnings.dart » ('j') | 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 part of resolution; 5 part of resolution;
6 6
7 abstract class TreeElements { 7 abstract class TreeElements {
8 AnalyzableElement get analyzedElement; 8 AnalyzableElement get analyzedElement;
9 Iterable<Node> get superUses; 9 Iterable<Node> get superUses;
10 10
(...skipping 498 matching lines...) Expand 10 before | Expand all | Expand 10 after
509 element.asyncMarker = AsyncMarker.SYNC_STAR; 509 element.asyncMarker = AsyncMarker.SYNC_STAR;
510 } 510 }
511 if (element.isAbstract) { 511 if (element.isAbstract) {
512 compiler.reportError(asyncModifier, 512 compiler.reportError(asyncModifier,
513 MessageKind.ASYNC_MODIFIER_ON_ABSTRACT_METHOD, 513 MessageKind.ASYNC_MODIFIER_ON_ABSTRACT_METHOD,
514 {'modifier': element.asyncMarker}); 514 {'modifier': element.asyncMarker});
515 } else if (element.isConstructor) { 515 } else if (element.isConstructor) {
516 compiler.reportError(asyncModifier, 516 compiler.reportError(asyncModifier,
517 MessageKind.ASYNC_MODIFIER_ON_CONSTRUCTOR, 517 MessageKind.ASYNC_MODIFIER_ON_CONSTRUCTOR,
518 {'modifier': element.asyncMarker}); 518 {'modifier': element.asyncMarker});
519 } else if (functionExpression.body.asReturn() != null && 519 } else {
520 if (element.isSetter) {
521 compiler.reportError(asyncModifier,
522 MessageKind.ASYNC_MODIFIER_ON_SETTER,
523 {'modifier': element.asyncMarker});
524
525 }
526 if (functionExpression.body.asReturn() != null &&
520 element.asyncMarker.isYielding) { 527 element.asyncMarker.isYielding) {
521 compiler.reportError(asyncModifier, 528 compiler.reportError(asyncModifier,
522 MessageKind.YIELDING_MODIFIER_ON_ARROW_BODY, 529 MessageKind.YIELDING_MODIFIER_ON_ARROW_BODY,
523 {'modifier': element.asyncMarker}); 530 {'modifier': element.asyncMarker});
531 }
524 } 532 }
525 } 533 }
526 } 534 }
527 535
528 TreeElements resolveMethodElementImplementation( 536 TreeElements resolveMethodElementImplementation(
529 FunctionElement element, FunctionExpression tree) { 537 FunctionElement element, FunctionExpression tree) {
530 return compiler.withCurrentElement(element, () { 538 return compiler.withCurrentElement(element, () {
531 if (element.isExternal && tree.hasBody()) { 539 if (element.isExternal && tree.hasBody()) {
532 compiler.reportError(element, 540 compiler.reportError(element,
533 MessageKind.EXTERNAL_WITH_BODY, 541 MessageKind.EXTERNAL_WITH_BODY,
(...skipping 4492 matching lines...) Expand 10 before | Expand all | Expand 10 after
5026 } 5034 }
5027 5035
5028 /// The result for the resolution of the `assert` method. 5036 /// The result for the resolution of the `assert` method.
5029 class AssertResult implements ResolutionResult { 5037 class AssertResult implements ResolutionResult {
5030 const AssertResult(); 5038 const AssertResult();
5031 5039
5032 Element get element => null; 5040 Element get element => null;
5033 5041
5034 String toString() => 'AssertResult()'; 5042 String toString() => 'AssertResult()';
5035 } 5043 }
OLDNEW
« no previous file with comments | « no previous file | pkg/compiler/lib/src/warnings.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698