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

Side by Side Diff: pkg/analyzer/lib/src/summary/fasta/summary_builder.dart

Issue 2456803004: fixes #27586, prefer context type in generic inference (Closed)
Patch Set: fix Created 3 years, 9 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 | « pkg/analyzer/lib/src/generated/type_system.dart ('k') | pkg/analyzer/lib/src/summary/link.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 /// Logic to build unlinked summaries. 5 /// Logic to build unlinked summaries.
6 library summary.src.summary_builder; 6 library summary.src.summary_builder;
7 7
8 import 'package:front_end/src/fasta/parser/class_member_parser.dart'; 8 import 'package:front_end/src/fasta/parser/class_member_parser.dart';
9 import 'package:front_end/src/fasta/parser/identifier_context.dart'; 9 import 'package:front_end/src/fasta/parser/identifier_context.dart';
10 import 'package:front_end/src/fasta/parser/parser.dart'; 10 import 'package:front_end/src/fasta/parser/parser.dart';
(...skipping 1418 matching lines...) Expand 10 before | Expand all | Expand 10 after
1429 1429
1430 void handleModifier(Token token) { 1430 void handleModifier(Token token) {
1431 debugEvent("Modifier"); 1431 debugEvent("Modifier");
1432 var modifier = _modifierFlag[token.stringValue]; 1432 var modifier = _modifierFlag[token.stringValue];
1433 if (modifier & _const_flag != 0) inConstContext = true; 1433 if (modifier & _const_flag != 0) inConstContext = true;
1434 push(modifier); 1434 push(modifier);
1435 } 1435 }
1436 1436
1437 void handleModifiers(int count) { 1437 void handleModifiers(int count) {
1438 debugEvent("Modifiers"); 1438 debugEvent("Modifiers");
1439 push((popList(count) ?? const []).fold(0, (a, b) => a | b)); 1439 push((popList(count) ?? const []).fold/*<int>*/(0, (a, b) => a | b));
1440 } 1440 }
1441 1441
1442 void handleNoConstructorReferenceContinuationAfterTypeArguments(Token token) { 1442 void handleNoConstructorReferenceContinuationAfterTypeArguments(Token token) {
1443 debugEvent("NoConstructorReferenceContinuationAfterTypeArguments"); 1443 debugEvent("NoConstructorReferenceContinuationAfterTypeArguments");
1444 } 1444 }
1445 1445
1446 void handleNoFieldInitializer(Token token) { 1446 void handleNoFieldInitializer(Token token) {
1447 debugEvent("NoFieldInitializer"); 1447 debugEvent("NoFieldInitializer");
1448 push(new _InitializedName(pop(), null)); 1448 push(new _InitializedName(pop(), null));
1449 } 1449 }
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after
1590 } 1590 }
1591 1591
1592 /// Internal representation of an initialized name. 1592 /// Internal representation of an initialized name.
1593 class _InitializedName { 1593 class _InitializedName {
1594 final String name; 1594 final String name;
1595 final UnlinkedExecutableBuilder initializer; 1595 final UnlinkedExecutableBuilder initializer;
1596 _InitializedName(this.name, this.initializer); 1596 _InitializedName(this.name, this.initializer);
1597 1597
1598 toString() => "II:" + (initializer != null ? "$name = $initializer" : name); 1598 toString() => "II:" + (initializer != null ? "$name = $initializer" : name);
1599 } 1599 }
OLDNEW
« no previous file with comments | « pkg/analyzer/lib/src/generated/type_system.dart ('k') | pkg/analyzer/lib/src/summary/link.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698