Chromium Code Reviews| Index: pkg/analyzer/lib/src/summary/resynthesize.dart |
| diff --git a/pkg/analyzer/lib/src/summary/resynthesize.dart b/pkg/analyzer/lib/src/summary/resynthesize.dart |
| index 234f46a35500c80a0cf52cb9eedf062b992666de..809471ec5483056385a757e54824ea8c27889611 100644 |
| --- a/pkg/analyzer/lib/src/summary/resynthesize.dart |
| +++ b/pkg/analyzer/lib/src/summary/resynthesize.dart |
| @@ -1221,7 +1221,7 @@ class _ReferenceInfo { |
| * If this reference refers to a non-generic type, the type it refers to. |
| * Otherwise `null`. |
| */ |
| - DartType type; |
| + DartType _type; |
| /** |
| * The number of type parameters accepted by the entity referred to by this |
| @@ -1247,10 +1247,19 @@ class _ReferenceInfo { |
| DartType specialType, |
| this.numTypeParameters) { |
| if (specialType != null) { |
| - type = specialType; |
| - } else { |
| - type = _buildType(true, 0, (_) => DynamicTypeImpl.instance, const []); |
| + _type = specialType; |
| + } |
| + } |
| + |
| + /** |
| + * If this reference refers to a non-generic type, the type it refers to. |
| + * Otherwise `null`. |
| + */ |
| + DartType get type { |
| + if (_type == null) { |
| + _type = _buildType(true, 0, (_) => DynamicTypeImpl.instance, const []); |
| } |
| + return _type; |
| } |
| /** |
| @@ -1338,11 +1347,18 @@ class _ReferenceInfo { |
| typeArguments = |
| _buildTypeArguments(numTypeArguments, getTypeArgument); |
| } else if (libraryResynthesizer.summaryResynthesizer.strongMode && |
| - instantiateToBoundsAllowed) { |
| + instantiateToBoundsAllowed |
| +// && !_isBeingInstantiatedToBounds |
|
Brian Wilkerson
2017/04/24 18:35:47
Should we remove the commented out code?
|
| + ) { |
| +// _isBeingInstantiatedToBounds = true; |
| +// try { |
| FunctionType instantiatedToBounds = libraryResynthesizer |
| .summaryResynthesizer.context.typeSystem |
| .instantiateToBounds(element.type) as FunctionType; |
| typeArguments = instantiatedToBounds.typeArguments; |
| +// } finally { |
| +// _isBeingInstantiatedToBounds = false; |
| +// } |
| } else { |
| typeArguments = new List<DartType>.filled( |
| numTypeParameters, DynamicTypeImpl.instance); |