Chromium Code Reviews| Index: pkg/analyzer/lib/src/task/strong_mode.dart |
| diff --git a/pkg/analyzer/lib/src/task/strong_mode.dart b/pkg/analyzer/lib/src/task/strong_mode.dart |
| index 2edea6a8ef79088935eee5c65523b3cec41927d4..c3716adcc0b22c848270f28947239856ce1523e3 100644 |
| --- a/pkg/analyzer/lib/src/task/strong_mode.dart |
| +++ b/pkg/analyzer/lib/src/task/strong_mode.dart |
| @@ -27,11 +27,11 @@ void setParameterType(PropertyAccessorElement element, DartType type) { |
| // |
| // Update the type of the setter to reflect the new parameter type. |
| // |
| + // TODO(jmesserly): why is this necessary? The function type should always |
|
Brian Wilkerson
2015/11/13 18:56:16
Good question! I don't know. Does anything break i
Jennifer Messerly
2015/11/13 19:04:46
Yeah, I was planning to give it a shot right after
Brian Wilkerson
2015/11/13 20:17:14
Sounds good. Certainly not necessary before landin
|
| + // delegate to the orginal element. |
| FunctionType functionType = element.type; |
| if (functionType is FunctionTypeImpl) { |
| - element.type = |
| - new FunctionTypeImpl(element, functionType.prunedTypedefs) |
| - ..typeArguments = functionType.typeArguments; |
| + element.type = new FunctionTypeImpl(element); |
| } else { |
| assert(false); |
| } |
| @@ -53,11 +53,12 @@ void setReturnType(ExecutableElement element, DartType type) { |
| // Update the return type of the element, which is stored in two places: |
| // directly in the element and indirectly in the type of the element. |
| // |
| + // TODO(jmesserly): why is this necessary? The function type should always |
| + // delegate to the orginal element. |
| element.returnType = type; |
| FunctionType functionType = element.type; |
| if (functionType is FunctionTypeImpl) { |
| - element.type = new FunctionTypeImpl(element, functionType.prunedTypedefs) |
| - ..typeArguments = functionType.typeArguments; |
| + element.type = new FunctionTypeImpl(element); |
| } else { |
| assert(false); |
| } |