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

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

Issue 11299009: Support type literals as compile-time constants. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address comments. Created 8 years, 1 month 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: sdk/lib/_internal/compiler/implementation/elements/elements.dart
diff --git a/sdk/lib/_internal/compiler/implementation/elements/elements.dart b/sdk/lib/_internal/compiler/implementation/elements/elements.dart
index 4894e239c4dd3fda1000ecb3689400abefd7d4da..9b8bc89f85c452d41b8ec0c02bb27caa9623cd18 100644
--- a/sdk/lib/_internal/compiler/implementation/elements/elements.dart
+++ b/sdk/lib/_internal/compiler/implementation/elements/elements.dart
@@ -1727,6 +1727,11 @@ class Elements {
static bool isUnresolved(Element e) => e == null || e.isErroneous();
static bool isErroneousElement(Element e) => e != null && e.isErroneous();
+ static bool isClass(Element e) => e != null && e.kind == ElementKind.CLASS;
+ static bool isTypedef(Element e) {
+ return e != null && e.kind == ElementKind.TYPEDEF;
+ }
+
static bool isLocal(Element element) {
return !Elements.isUnresolved(element)
&& !element.isInstanceMember()

Powered by Google App Engine
This is Rietveld 408576698