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 7bc59b615db73673e25882fb75f011e85c8be637..5ed44ecda880c34ae8d485c9da20d61327e6940a 100644 |
--- a/pkg/analyzer/lib/src/context/context.dart |
+++ b/pkg/analyzer/lib/src/context/context.dart |
@@ -466,6 +466,11 @@ class AnalysisContextImpl implements InternalAnalysisContext { |
@override |
TypeProvider get typeProvider { |
+ // The `AnalysisContextTarget.request` results to into the SDK partition, |
Paul Berry
2016/06/02 12:09:35
"to" -> "go"
|
+ // and the TYPE_PROVIDER result is computed and put into the SDK partition |
+ // only by the first non-SDK analysis context. So, in order to reuse it |
+ // in other analysis context, we need to ask it from the cache. |
Paul Berry
2016/06/02 12:09:36
"in other analysis context, we need to ask it" ->
|
+ _typeProvider ??= getResult(AnalysisContextTarget.request, TYPE_PROVIDER); |
if (_typeProvider != null) { |
return _typeProvider; |
} |