| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 } |
| OLD | NEW |