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

Unified Diff: pkg/compiler/lib/src/resolution/resolution.dart

Issue 2366263004: Handle fields with initializers in kernel_impact (Closed)
Patch Set: Created 4 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
« no previous file with comments | « pkg/compiler/lib/src/resolution/members.dart ('k') | pkg/compiler/lib/src/resolution/type_resolver.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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();
« no previous file with comments | « pkg/compiler/lib/src/resolution/members.dart ('k') | pkg/compiler/lib/src/resolution/type_resolver.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698