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

Side by Side Diff: pkg/front_end/lib/src/fasta/kernel/kernel_shadow_ast.dart

Issue 2898313002: Fix type inference of yield* statements (Closed)
Patch Set: Created 3 years, 7 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/front_end/lib/src/fasta/type_inference/type_inferrer.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) 2017, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2017, 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 /// This file declares a "shadow hierarchy" of concrete classes which extend 5 /// This file declares a "shadow hierarchy" of concrete classes which extend
6 /// the kernel class hierarchy, adding methods and fields needed by the 6 /// the kernel class hierarchy, adding methods and fields needed by the
7 /// BodyBuilder. 7 /// BodyBuilder.
8 /// 8 ///
9 /// Instances of these classes may be created using the factory methods in 9 /// Instances of these classes may be created using the factory methods in
10 /// `ast_factory.dart`. 10 /// `ast_factory.dart`.
(...skipping 1306 matching lines...) Expand 10 before | Expand all | Expand 10 after
1317 closureContext.isGenerator ? closureContext.returnContext : null; 1317 closureContext.isGenerator ? closureContext.returnContext : null;
1318 if (isYieldStar && typeContext != null) { 1318 if (isYieldStar && typeContext != null) {
1319 typeContext = inferrer.wrapType( 1319 typeContext = inferrer.wrapType(
1320 typeContext, 1320 typeContext,
1321 closureContext.isAsync 1321 closureContext.isAsync
1322 ? inferrer.coreTypes.streamClass 1322 ? inferrer.coreTypes.streamClass
1323 : inferrer.coreTypes.iterableClass); 1323 : inferrer.coreTypes.iterableClass);
1324 } 1324 }
1325 var inferredType = inferrer.inferExpression( 1325 var inferredType = inferrer.inferExpression(
1326 expression, typeContext, closureContext != null); 1326 expression, typeContext, closureContext != null);
1327 closureContext?.handleYield(inferrer, isYieldStar, inferredType); 1327 closureContext.handleYield(inferrer, isYieldStar, inferredType);
1328 inferrer.listener.yieldStatementExit(this); 1328 inferrer.listener.yieldStatementExit(this);
1329 } 1329 }
1330 } 1330 }
OLDNEW
« no previous file with comments | « no previous file | pkg/front_end/lib/src/fasta/type_inference/type_inferrer.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698