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

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

Issue 1906413004: Fix missing downwards inference on fields, report more inference (Closed) Base URL: git@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
« no previous file with comments | « no previous file | pkg/analyzer/lib/src/generated/static_type_analyzer.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) 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.resolver; 5 library analyzer.src.generated.resolver;
6 6
7 import 'dart:collection'; 7 import 'dart:collection';
8 8
9 import 'package:analyzer/dart/ast/ast.dart'; 9 import 'package:analyzer/dart/ast/ast.dart';
10 import 'package:analyzer/dart/ast/token.dart'; 10 import 'package:analyzer/dart/ast/token.dart';
(...skipping 6779 matching lines...) Expand 10 before | Expand all | Expand 10 after
6790 node.initializer != null) { 6790 node.initializer != null) {
6791 (element as ConstVariableElement).constantInitializer = 6791 (element as ConstVariableElement).constantInitializer =
6792 new ConstantAstCloner().cloneNode(node.initializer); 6792 new ConstantAstCloner().cloneNode(node.initializer);
6793 } 6793 }
6794 return null; 6794 return null;
6795 } 6795 }
6796 6796
6797 @override 6797 @override
6798 visitVariableDeclarationList(VariableDeclarationList node) { 6798 visitVariableDeclarationList(VariableDeclarationList node) {
6799 for (VariableDeclaration decl in node.variables) { 6799 for (VariableDeclaration decl in node.variables) {
6800 InferenceContext.setType(decl, node.type?.type); 6800 InferenceContext.setType(decl, decl.element?.type);
6801 } 6801 }
6802 super.visitVariableDeclarationList(node); 6802 super.visitVariableDeclarationList(node);
6803 } 6803 }
6804 6804
6805 @override 6805 @override
6806 Object visitWhileStatement(WhileStatement node) { 6806 Object visitWhileStatement(WhileStatement node) {
6807 // Note: since we don't call the base class, we have to maintain 6807 // Note: since we don't call the base class, we have to maintain
6808 // _implicitLabelScope ourselves. 6808 // _implicitLabelScope ourselves.
6809 ImplicitLabelScope outerImplicitScope = _implicitLabelScope; 6809 ImplicitLabelScope outerImplicitScope = _implicitLabelScope;
6810 try { 6810 try {
(...skipping 3965 matching lines...) Expand 10 before | Expand all | Expand 10 after
10776 return null; 10776 return null;
10777 } 10777 }
10778 if (identical(node.staticElement, variable)) { 10778 if (identical(node.staticElement, variable)) {
10779 if (node.inSetterContext()) { 10779 if (node.inSetterContext()) {
10780 result = true; 10780 result = true;
10781 } 10781 }
10782 } 10782 }
10783 return null; 10783 return null;
10784 } 10784 }
10785 } 10785 }
OLDNEW
« no previous file with comments | « no previous file | pkg/analyzer/lib/src/generated/static_type_analyzer.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698