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

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

Issue 2699073003: Support `void` as generic argument.
Patch Set: Add specialized messages for `void` for-ins. Created 3 years, 9 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: 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 5706455830bcd7eb529e160555c97cf6c44f21ee..8d53c06e4a34f17cd7afa2bbd2e966c0efae26ed 100644
--- a/pkg/compiler/lib/src/resolution/resolution.dart
+++ b/pkg/compiler/lib/src/resolution/resolution.dart
@@ -442,15 +442,6 @@ class ResolverTask extends CompilerTask {
ResolutionDartType resolveTypeAnnotation(
Element element, TypeAnnotation annotation) {
- ResolutionDartType type = _resolveReturnType(element, annotation);
- if (type.isVoid) {
- reporter.reportErrorMessage(annotation, MessageKind.VOID_NOT_ALLOWED);
- }
- return type;
- }
-
- ResolutionDartType _resolveReturnType(
- Element element, TypeAnnotation annotation) {
if (annotation == null) return const ResolutionDynamicType();
ResolutionDartType result =
visitorFor(element).resolveTypeAnnotation(annotation);

Powered by Google App Engine
This is Rietveld 408576698