Chromium Code Reviews| Index: pkg/analyzer/lib/src/dart/element/element.dart |
| diff --git a/pkg/analyzer/lib/src/dart/element/element.dart b/pkg/analyzer/lib/src/dart/element/element.dart |
| index 585a012336957e4726023786b012245b00b9451d..e458c33d83996e9de0d8dae0875f33c3f36d5840 100644 |
| --- a/pkg/analyzer/lib/src/dart/element/element.dart |
| +++ b/pkg/analyzer/lib/src/dart/element/element.dart |
| @@ -1082,7 +1082,9 @@ class CompilationUnitElementImpl extends UriReferencedElementImpl |
| */ |
| void set types(List<ClassElement> types) { |
| for (ClassElement type in types) { |
| - (type as ClassElementImpl).enclosingElement = this; |
| + if (type is ClassElementImpl) { |
|
Paul Berry
2016/03/24 19:40:14
Nit: it's not obvious without reading the rest of
|
| + type.enclosingElement = this; |
| + } |
| } |
| this._types = types; |
| } |