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

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

Issue 2361203004: Issue 27358. Reset AnalysisContext 'sourceFactory' and 'typeSystem' on analysis options change. (Closed)
Patch Set: Created 4 years, 3 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
Index: pkg/analyzer/lib/src/context/context.dart
diff --git a/pkg/analyzer/lib/src/context/context.dart b/pkg/analyzer/lib/src/context/context.dart
index 3b6846fb6b3db9ca99dbbc5ccf78ac4033f9c6cc..f56c12cc3c1a86f86c224ff8933c59517ea8461f 100644
--- a/pkg/analyzer/lib/src/context/context.dart
+++ b/pkg/analyzer/lib/src/context/context.dart
@@ -329,6 +329,9 @@ class AnalysisContextImpl implements InternalAnalysisContext {
this._options.incrementalValidation = options.incrementalValidation;
this._options.lint = options.lint;
this._options.preserveComments = options.preserveComments;
+ if (this._options.strongMode != options.strongMode) {
+ _typeSystem = null;
+ }
this._options.strongMode = options.strongMode;
this._options.trackCacheDependencies = options.trackCacheDependencies;
this._options.finerGrainedInvalidation = options.finerGrainedInvalidation;

Powered by Google App Engine
This is Rietveld 408576698