| 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;
|
|
|
|
|