Chromium Code Reviews| Index: sdk/lib/_internal/compiler/implementation/types/simple_types_inferrer.dart |
| diff --git a/sdk/lib/_internal/compiler/implementation/types/simple_types_inferrer.dart b/sdk/lib/_internal/compiler/implementation/types/simple_types_inferrer.dart |
| index 2473f801d4d1b72d9b5276d1c4a616723d7b840f..317e0b6f4bfaf43c482adb9c356fc47c1a644d5a 100644 |
| --- a/sdk/lib/_internal/compiler/implementation/types/simple_types_inferrer.dart |
| +++ b/sdk/lib/_internal/compiler/implementation/types/simple_types_inferrer.dart |
| @@ -82,7 +82,7 @@ abstract class TypeInformation { |
| void addCaller(Element element) { |
| callers.add(element); |
| } |
| - |
| + |
| void addAssignment(Node node, TypeMask mask) { |
| assignments[node] = mask; |
| } |
| @@ -428,7 +428,7 @@ class InternalSimpleTypesInferrer extends TypesInferrer { |
| if (hasAnalyzedAll) return; |
| if (analyzed < numberOfElementsToAnalyze) return; |
| hasAnalyzedAll = true; |
| - |
| + |
| // If we have analyzed all the world, we know all assigments to |
| // fields and parameters, and can therefore infer a type for them. |
| typeInfo.forEach((element, TypeInformation info) { |
| @@ -662,7 +662,9 @@ class InternalSimpleTypesInferrer extends TypesInferrer { |
| if (compiler.trustTypeAnnotations |
| // Parameters are being checked by the method, and we can |
| // therefore only trust their type after the checks. |
| - || (compiler.enableTypeAssertions && !analyzedElement.isParameter())) { |
| + || (compiler.enableTypeAssertions && |
| + !analyzedElement.isParameter() && |
| + !analyzedElement.isFieldParameter())) { |
|
ngeoffray
2013/07/12 09:34:03
Do we have a test for this? How did you find it wa
|
| var annotation = analyzedElement.computeType(compiler); |
| if (analyzedElement.isGetter() |
| || analyzedElement.isFunction() |