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

Side by Side Diff: pkg/analysis_server/lib/src/services/refactoring/extract_method.dart

Issue 2590883004: Put a TypeProvider on the TypeSystem implementations. (Closed)
Patch Set: Rebase Created 3 years, 11 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/dart/constant/evaluation.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 services.src.refactoring.extract_method; 5 library services.src.refactoring.extract_method;
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 8
9 import 'package:analysis_server/src/protocol_server.dart' hide Element; 9 import 'package:analysis_server/src/protocol_server.dart' hide Element;
10 import 'package:analysis_server/src/services/correction/name_suggestion.dart'; 10 import 'package:analysis_server/src/services/correction/name_suggestion.dart';
(...skipping 1201 matching lines...) Expand 10 before | Expand all | Expand 10 after
1212 if (type.isBottom) { 1212 if (type.isBottom) {
1213 return; 1213 return;
1214 } 1214 }
1215 // combine types 1215 // combine types
1216 if (returnType == null) { 1216 if (returnType == null) {
1217 returnType = type; 1217 returnType = type;
1218 } else { 1218 } else {
1219 if (returnType is InterfaceType && type is InterfaceType) { 1219 if (returnType is InterfaceType && type is InterfaceType) {
1220 returnType = InterfaceType.getSmartLeastUpperBound(returnType, type); 1220 returnType = InterfaceType.getSmartLeastUpperBound(returnType, type);
1221 } else { 1221 } else {
1222 returnType = context.typeSystem 1222 returnType = context.typeSystem.getLeastUpperBound(returnType, type);
1223 .getLeastUpperBound(context.typeProvider, returnType, type);
1224 } 1223 }
1225 } 1224 }
1226 } 1225 }
1227 } 1226 }
1228 1227
1229 /** 1228 /**
1230 * Generalized version of some source, in which references to the specific 1229 * Generalized version of some source, in which references to the specific
1231 * variables are replaced with pattern variables, with back mapping from the 1230 * variables are replaced with pattern variables, with back mapping from the
1232 * pattern to the original variable names. 1231 * pattern to the original variable names.
1233 */ 1232 */
(...skipping 10 matching lines...) Expand all
1244 return false; 1243 return false;
1245 } 1244 }
1246 for (int i = 0; i < parameterTypes.length; i++) { 1245 for (int i = 0; i < parameterTypes.length; i++) {
1247 if (other.parameterTypes[i] != parameterTypes[i]) { 1246 if (other.parameterTypes[i] != parameterTypes[i]) {
1248 return false; 1247 return false;
1249 } 1248 }
1250 } 1249 }
1251 return true; 1250 return true;
1252 } 1251 }
1253 } 1252 }
OLDNEW
« no previous file with comments | « no previous file | pkg/analyzer/lib/src/dart/constant/evaluation.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698