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

Side by Side Diff: pkg/analyzer/lib/src/generated/error_verifier.dart

Issue 1842563003: Format everything in analyzer (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 4 years, 8 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) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, 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 analyzer.src.generated.error_verifier; 5 library analyzer.src.generated.error_verifier;
6 6
7 import 'dart:collection'; 7 import 'dart:collection';
8 import "dart:math" as math; 8 import "dart:math" as math;
9 9
10 import 'package:analyzer/dart/ast/ast.dart'; 10 import 'package:analyzer/dart/ast/ast.dart';
(...skipping 626 matching lines...) Expand 10 before | Expand all | Expand 10 after
637 try { 637 try {
638 _inAsync = node.isAsynchronous; 638 _inAsync = node.isAsynchronous;
639 _inGenerator = node.isGenerator; 639 _inGenerator = node.isGenerator;
640 FunctionType functionType = 640 FunctionType functionType =
641 _enclosingFunction == null ? null : _enclosingFunction.type; 641 _enclosingFunction == null ? null : _enclosingFunction.type;
642 DartType expectedReturnType = functionType == null 642 DartType expectedReturnType = functionType == null
643 ? DynamicTypeImpl.instance 643 ? DynamicTypeImpl.instance
644 : functionType.returnType; 644 : functionType.returnType;
645 bool isSetterWithImplicitReturn = 645 bool isSetterWithImplicitReturn =
646 _enclosingFunction.hasImplicitReturnType && 646 _enclosingFunction.hasImplicitReturnType &&
647 _enclosingFunction is PropertyAccessorElement && 647 _enclosingFunction is PropertyAccessorElement &&
648 (_enclosingFunction as PropertyAccessorElement).isSetter; 648 (_enclosingFunction as PropertyAccessorElement).isSetter;
649 if (!isSetterWithImplicitReturn) { 649 if (!isSetterWithImplicitReturn) {
650 _checkForReturnOfInvalidType(node.expression, expectedReturnType); 650 _checkForReturnOfInvalidType(node.expression, expectedReturnType);
651 } 651 }
652 return super.visitExpressionFunctionBody(node); 652 return super.visitExpressionFunctionBody(node);
653 } finally { 653 } finally {
654 _inAsync = wasInAsync; 654 _inAsync = wasInAsync;
655 _inGenerator = wasInGenerator; 655 _inGenerator = wasInGenerator;
656 } 656 }
657 } 657 }
658 658
(...skipping 5403 matching lines...) Expand 10 before | Expand all | Expand 10 after
6062 class _InvocationCollector extends RecursiveAstVisitor { 6062 class _InvocationCollector extends RecursiveAstVisitor {
6063 final List<String> superCalls = <String>[]; 6063 final List<String> superCalls = <String>[];
6064 6064
6065 @override 6065 @override
6066 visitMethodInvocation(MethodInvocation node) { 6066 visitMethodInvocation(MethodInvocation node) {
6067 if (node.target is SuperExpression) { 6067 if (node.target is SuperExpression) {
6068 superCalls.add(node.methodName.name); 6068 superCalls.add(node.methodName.name);
6069 } 6069 }
6070 } 6070 }
6071 } 6071 }
OLDNEW
« no previous file with comments | « pkg/analyzer/lib/src/context/source.dart ('k') | pkg/analyzer/lib/src/plugin/plugin_configuration.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698