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

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

Issue 10917285: Stub implementation of patch invariants for the patch refactoring. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Leftovers from rebase. Created 8 years, 3 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/typechecker.dart
diff --git a/lib/compiler/implementation/typechecker.dart b/lib/compiler/implementation/typechecker.dart
index 50d34a1fc8b31635606cc8e5e4c877f9b420782a..c34ea42966ea076133ada47ab8eda3895ad6cb9f 100644
--- a/lib/compiler/implementation/typechecker.dart
+++ b/lib/compiler/implementation/typechecker.dart
@@ -26,6 +26,7 @@ class TypeCheckerTask extends CompilerTask {
abstract class DartType implements Hashable {
abstract SourceString get name;
+ /// Invariant: [element] must be a declaration element.
abstract Element get element;
/**
@@ -153,7 +154,9 @@ class FunctionType implements DartType {
Link<DartType> parameterTypes;
FunctionType(DartType this.returnType, Link<DartType> this.parameterTypes,
- Element this.element);
+ Element this.element) {
+ assert(element == null || element.isDeclaration);
+ }
DartType unalias(Compiler compiler) => this;

Powered by Google App Engine
This is Rietveld 408576698