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

Unified Diff: pkg/analyzer/lib/src/task/dart.dart

Issue 1596733002: strong_mode.dart: remove extra asserts and throw (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | pkg/analyzer/lib/src/task/strong_mode.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/lib/src/task/dart.dart
diff --git a/pkg/analyzer/lib/src/task/dart.dart b/pkg/analyzer/lib/src/task/dart.dart
index 0e9488321db3335eb5d3e7e04a369193d05fc9e0..3ba3b1a050dbcebae3758d4dcb08fff8ca22a9c8 100644
--- a/pkg/analyzer/lib/src/task/dart.dart
+++ b/pkg/analyzer/lib/src/task/dart.dart
@@ -3215,14 +3215,7 @@ class InferStaticVariableTypeTask extends InferStaticVariableTask {
if (newType == null || newType.isBottom) {
newType = typeProvider.dynamicType;
}
- variable.type = newType;
- (variable.initializer as ExecutableElementImpl).returnType = newType;
- if (variable is PropertyInducingElementImpl) {
- setReturnType(variable.getter, newType);
- if (!variable.isFinal && !variable.isConst) {
- setParameterType(variable.setter, newType);
- }
- }
+ setFieldType(variable, newType);
} else {
// TODO(brianwilkerson) For now we simply don't infer any type for
// variables or fields involved in a cycle. We could try to be smarter
« no previous file with comments | « no previous file | pkg/analyzer/lib/src/task/strong_mode.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698