Chromium Code Reviews| Index: lib/compiler/implementation/elements/elements.dart |
| diff --git a/lib/compiler/implementation/elements/elements.dart b/lib/compiler/implementation/elements/elements.dart |
| index 8eb26d8a00f392d4332016bb66bbed4bbe3d6143..8034b8ff91ada40c9857c5c13ced6dc44af71f1b 100644 |
| --- a/lib/compiler/implementation/elements/elements.dart |
| +++ b/lib/compiler/implementation/elements/elements.dart |
| @@ -1263,7 +1263,7 @@ abstract class TypeDeclarationElement implements Element { |
| * variables are not set until [element] has been resolved. |
| */ |
| static Link<DartType> createTypeVariables(TypeDeclarationElement element, |
| - NodeList parameters) { |
| + NodeList parameters) { |
| if (parameters == null) return const Link<DartType>(); |
| // Create types and elements for type variable. |
| @@ -1651,6 +1651,15 @@ class Elements { |
| static bool isUnresolved(Element e) => e == null || e.isErroneous(); |
| static bool isErroneousElement(Element e) => e != null && e.isErroneous(); |
| + /** |
| + * A valid element represents something in the program (as opposed to a |
| + * failure or problem in the resolution). |
| + * |
| + * Currently elements are valid if they are not null and they are not |
| + * erroneuous elements. |
|
ngeoffray
2012/10/26 12:15:57
erroneuous -> erroneous
|
| + */ |
| + static bool isValid(Element e) => !isUnresolved(e); |
|
ngeoffray
2012/10/26 12:15:57
I'd really prefer not to have this method. isValid
karlklose
2012/10/26 12:39:43
Done, removed it.
|
| + |
| static bool isLocal(Element element) { |
| return !Elements.isUnresolved(element) |
| && !element.isInstanceMember() |