Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(512)

Unified Diff: lib/compiler/implementation/elements/elements.dart

Issue 11229002: Handle type variable in static member. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: lib/compiler/implementation/elements/elements.dart
diff --git a/lib/compiler/implementation/elements/elements.dart b/lib/compiler/implementation/elements/elements.dart
index faf61e1c721ae04bf290c0de951e99e5621d2efb..8e77897c1f9d0b02b5ee3019687a2374608cddc6 100644
--- a/lib/compiler/implementation/elements/elements.dart
+++ b/lib/compiler/implementation/elements/elements.dart
@@ -156,8 +156,18 @@ class Element implements Spannable {
return enclosingElement != null && enclosingElement.isClass();
}
bool isInstanceMember() => false;
+
+ /**
+ * Returns [:true:] if this element is enclosed in a static member or is
+ * itself a static member.
+ */
+ bool isInStaticMember() {
karlklose 2012/10/19 12:05:38 I find it confusing, that getEnclosingMember may r
ahe 2012/10/19 12:22:40 I find the behavior really useful. So I would rath
Johnni Winther 2012/10/22 09:03:32 [getEnclosingMember] is only used by [isInStaticMe
+ Element member = getEnclosingMember();
+ return member != null && member.modifiers.isStatic();
+ }
+
bool isFactoryConstructor() => modifiers.isFactory();
- bool isGenerativeConstructor() =>
+ bool isGenerativeConstructor() =>
identical(kind, ElementKind.GENERATIVE_CONSTRUCTOR);
bool isGenerativeConstructorBody() =>
identical(kind, ElementKind.GENERATIVE_CONSTRUCTOR_BODY);

Powered by Google App Engine
This is Rietveld 408576698