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

Unified Diff: pkg/compiler/lib/src/inferrer/type_graph_nodes.dart

Issue 2863463002: Revert "Void is not required to be `null` anymore." (Closed)
Patch Set: Created 3 years, 8 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 | « CHANGELOG.md ('k') | pkg/compiler/lib/src/inferrer/type_system.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/inferrer/type_graph_nodes.dart
diff --git a/pkg/compiler/lib/src/inferrer/type_graph_nodes.dart b/pkg/compiler/lib/src/inferrer/type_graph_nodes.dart
index 2fe9245319374dbfa539ec6247628f2544935d31..403716fc20b19a040bc038a3868bf1f4efa2b3c6 100644
--- a/pkg/compiler/lib/src/inferrer/type_graph_nodes.dart
+++ b/pkg/compiler/lib/src/inferrer/type_graph_nodes.dart
@@ -1753,13 +1753,14 @@ TypeMask _narrowType(
{bool isNullable: true}) {
if (annotation.treatAsDynamic) return type;
if (annotation.isObject) return type;
- if (annotation.isVoid) return type;
TypeMask otherType;
if (annotation.isTypedef || annotation.isFunctionType) {
otherType = closedWorld.commonMasks.functionType;
} else if (annotation.isTypeVariable) {
// TODO(ngeoffray): Narrow to bound.
return type;
+ } else if (annotation.isVoid) {
+ otherType = closedWorld.commonMasks.nullType;
} else {
ResolutionInterfaceType interfaceType = annotation;
otherType = new TypeMask.nonNullSubtype(interfaceType.element, closedWorld);
« no previous file with comments | « CHANGELOG.md ('k') | pkg/compiler/lib/src/inferrer/type_system.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698