| Index: dart/lib/compiler/implementation/elements/elements.dart
|
| diff --git a/dart/lib/compiler/implementation/elements/elements.dart b/dart/lib/compiler/implementation/elements/elements.dart
|
| index 5da84bcafd882921018d3d6ec859a86f0c1fb303..82808cf25c6febaf26d3acf80ab81858a944c238 100644
|
| --- a/dart/lib/compiler/implementation/elements/elements.dart
|
| +++ b/dart/lib/compiler/implementation/elements/elements.dart
|
| @@ -353,6 +353,8 @@ class Element implements Spannable {
|
| FunctionElement asFunctionElement() => null;
|
|
|
| static bool isInvalid(Element e) => e == null || e.isErroneous();
|
| +
|
| + bool isAbstract(Compiler compiler) => modifiers.isAbstract();
|
| }
|
|
|
| /**
|
| @@ -1184,7 +1186,7 @@ class FunctionElement extends Element {
|
| return type;
|
| }
|
|
|
| - Node parseNode(DiagnosticListener listener) {
|
| + FunctionExpression parseNode(DiagnosticListener listener) {
|
| if (patch == null) {
|
| if (modifiers.isExternal()) {
|
| listener.cancel("Compiling external function with no implementation.",
|
| @@ -1207,6 +1209,15 @@ class FunctionElement extends Element {
|
| return super.toString();
|
| }
|
| }
|
| +
|
| + bool isAbstract(Compiler compiler) {
|
| + if (super.isAbstract(compiler)) return true;
|
| + if (modifiers.isExternal()) return false;
|
| + if (isFunction() || isAccessor()) {
|
| + return !parseNode(compiler).hasBody();
|
| + }
|
| + return false;
|
| + }
|
| }
|
|
|
| class ConstructorBodyElement extends FunctionElement {
|
|
|