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

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

Issue 2699073003: Support `void` as generic argument.
Patch Set: Shuffle things around to have a better `voidRti` locality. Created 3 years, 7 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/resolution.dart ('k') | pkg/compiler/lib/src/typechecker.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/resolution/signatures.dart
diff --git a/pkg/compiler/lib/src/resolution/signatures.dart b/pkg/compiler/lib/src/resolution/signatures.dart
index 94964fc67f8ea17a443c41576d59299e8d069e9b..7c6614d1e47464da0437d62d922b5e2b233a7bc8 100644
--- a/pkg/compiler/lib/src/resolution/signatures.dart
+++ b/pkg/compiler/lib/src/resolution/signatures.dart
@@ -400,7 +400,7 @@ class SignatureResolver extends MappingVisitor<FormalElementX> {
}
switch (asyncMarker) {
case AsyncMarker.SYNC:
- returnType = visitor.resolveReturnType(returnNode);
+ returnType = visitor.resolveTypeAnnotation(returnNode);
break;
case AsyncMarker.SYNC_STAR:
ResolutionInterfaceType iterableType =
@@ -483,14 +483,6 @@ class SignatureResolver extends MappingVisitor<FormalElementX> {
}
ResolutionDartType resolveTypeAnnotation(TypeAnnotation annotation) {
- ResolutionDartType type = resolveReturnType(annotation);
- if (type.isVoid) {
- reporter.reportErrorMessage(annotation, MessageKind.VOID_NOT_ALLOWED);
- }
- return type;
- }
-
- ResolutionDartType resolveReturnType(TypeAnnotation annotation) {
if (annotation == null) return const ResolutionDynamicType();
ResolutionDartType result = resolver.resolveTypeAnnotation(annotation);
if (result == null) {
« no previous file with comments | « pkg/compiler/lib/src/resolution/resolution.dart ('k') | pkg/compiler/lib/src/typechecker.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698