| Index: pkg/compiler/lib/src/elements/common.dart
|
| diff --git a/pkg/compiler/lib/src/elements/common.dart b/pkg/compiler/lib/src/elements/common.dart
|
| index bbc682ae996c942ff6771d0a0cae7323a669d9d0..9cdce47251bceacdd2678c0d8217a5b1e0005106 100644
|
| --- a/pkg/compiler/lib/src/elements/common.dart
|
| +++ b/pkg/compiler/lib/src/elements/common.dart
|
| @@ -88,6 +88,13 @@ abstract class ElementCommon implements Element {
|
| bool get impliesType => (kind.category & ElementCategory.IMPLIES_TYPE) != 0;
|
|
|
| @override
|
| + bool get isAssignable {
|
| + if (isFinal || isConst) return false;
|
| + if (isFunction || isConstructor) return false;
|
| + return true;
|
| + }
|
| +
|
| + @override
|
| Element get declaration => this;
|
|
|
| @override
|
| @@ -130,6 +137,20 @@ abstract class ElementCommon implements Element {
|
| }
|
| return cls;
|
| }
|
| +
|
| + @override
|
| + Element get outermostEnclosingMemberOrTopLevel {
|
| + // TODO(lrn): Why is this called "Outermost"?
|
| + // TODO(johnniwinther): Clean up this method: This method does not return
|
| + // the outermost for elements in closure classses, but some call-sites rely
|
| + // on that behavior.
|
| + for (Element e = this; e != null; e = e.enclosingElement) {
|
| + if (e.isClassMember || e.isTopLevel) {
|
| + return e;
|
| + }
|
| + }
|
| + return null;
|
| + }
|
| }
|
|
|
| abstract class LibraryElementCommon implements LibraryElement {
|
| @@ -455,8 +476,6 @@ abstract class FunctionSignatureCommon implements FunctionSignature {
|
| optionalParameters.forEach(function);
|
| }
|
|
|
| - Element get firstOptionalParameter => optionalParameters.first;
|
| -
|
| void forEachParameter(void function(Element parameter)) {
|
| forEachRequiredParameter(function);
|
| forEachOptionalParameter(function);
|
|
|