Index: pkg/compiler/lib/src/resolution/resolution.dart |
diff --git a/pkg/compiler/lib/src/resolution/resolution.dart b/pkg/compiler/lib/src/resolution/resolution.dart |
index 13f248cd76033a7dec5bd0b4539609d8c8248e65..bdfffd8a4485bd9feb8e2aacfcbe2a9209ed26a5 100644 |
--- a/pkg/compiler/lib/src/resolution/resolution.dart |
+++ b/pkg/compiler/lib/src/resolution/resolution.dart |
@@ -430,16 +430,18 @@ class ResolverTask extends CompilerTask { |
} |
DartType resolveTypeAnnotation(Element element, TypeAnnotation annotation) { |
- DartType type = resolveReturnType(element, annotation); |
+ DartType type = _resolveReturnType(element, annotation); |
if (type.isVoid) { |
reporter.reportErrorMessage(annotation, MessageKind.VOID_NOT_ALLOWED); |
} |
return type; |
} |
- DartType resolveReturnType(Element element, TypeAnnotation annotation) { |
+ DartType _resolveReturnType(Element element, TypeAnnotation annotation) { |
if (annotation == null) return const DynamicType(); |
DartType result = visitorFor(element).resolveTypeAnnotation(annotation); |
+ assert(invariant(annotation, result != null, |
+ message: "No type computed for $annotation.")); |
if (result == null) { |
// TODO(karklose): warning. |
return const DynamicType(); |