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

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

Issue 11273034: Make unmatched static call a runtime error. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Refactored resolution code. 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 8eb26d8a00f392d4332016bb66bbed4bbe3d6143..8034b8ff91ada40c9857c5c13ced6dc44af71f1b 100644
--- a/lib/compiler/implementation/elements/elements.dart
+++ b/lib/compiler/implementation/elements/elements.dart
@@ -1263,7 +1263,7 @@ abstract class TypeDeclarationElement implements Element {
* variables are not set until [element] has been resolved.
*/
static Link<DartType> createTypeVariables(TypeDeclarationElement element,
- NodeList parameters) {
+ NodeList parameters) {
if (parameters == null) return const Link<DartType>();
// Create types and elements for type variable.
@@ -1651,6 +1651,15 @@ class Elements {
static bool isUnresolved(Element e) => e == null || e.isErroneous();
static bool isErroneousElement(Element e) => e != null && e.isErroneous();
+ /**
+ * A valid element represents something in the program (as opposed to a
+ * failure or problem in the resolution).
+ *
+ * Currently elements are valid if they are not null and they are not
+ * erroneuous elements.
ngeoffray 2012/10/26 12:15:57 erroneuous -> erroneous
+ */
+ static bool isValid(Element e) => !isUnresolved(e);
ngeoffray 2012/10/26 12:15:57 I'd really prefer not to have this method. isValid
karlklose 2012/10/26 12:39:43 Done, removed it.
+
static bool isLocal(Element element) {
return !Elements.isUnresolved(element)
&& !element.isInstanceMember()

Powered by Google App Engine
This is Rietveld 408576698