| Index: pkg/compiler/lib/src/elements/elements.dart
|
| diff --git a/pkg/compiler/lib/src/elements/elements.dart b/pkg/compiler/lib/src/elements/elements.dart
|
| index 60fcb20f2663e0b8141bc271a121e0dfe9e8b9f3..1a659289b9e1699c86c24e93d0345fb74d1a0c45 100644
|
| --- a/pkg/compiler/lib/src/elements/elements.dart
|
| +++ b/pkg/compiler/lib/src/elements/elements.dart
|
| @@ -84,6 +84,8 @@ class ElementKind {
|
| const ElementKind('class', ElementCategory.CLASS);
|
| static const ElementKind GENERATIVE_CONSTRUCTOR =
|
| const ElementKind('generative_constructor', ElementCategory.FACTORY);
|
| + static const ElementKind FACTORY_CONSTRUCTOR =
|
| + const ElementKind('factory_constructor', ElementCategory.FACTORY);
|
| static const ElementKind FIELD =
|
| const ElementKind('field', ElementCategory.VARIABLE);
|
| static const ElementKind FIELD_LIST =
|
| @@ -212,8 +214,8 @@ abstract class Element implements Entity {
|
| /// `true` if this element is a top level function, static or instance
|
| /// method, local function or closure defined by a function expression.
|
| ///
|
| - /// This property is `true` for operator methods and factory constructors but
|
| - /// `false` for getter and setter methods, and generative constructors.
|
| + /// This property is `true` for operator methods but `false` for getter and
|
| + /// setter methods, and generative and factory constructors.
|
| ///
|
| /// See also [isConstructor], [isGenerativeConstructor], and
|
| /// [isFactoryConstructor] for constructor properties, and [isAccessor],
|
| @@ -499,8 +501,7 @@ class Elements {
|
| }
|
|
|
| static bool isStaticOrTopLevelFunction(Element element) {
|
| - return isStaticOrTopLevel(element)
|
| - && (identical(element.kind, ElementKind.FUNCTION));
|
| + return isStaticOrTopLevel(element) && element.isFunction;
|
| }
|
|
|
| static bool isInstanceMethod(Element element) {
|
|
|