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

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

Issue 2718513002: Void is not required to be `null` anymore. (Closed)
Patch Set: Fix more places in the VM. Created 3 years, 10 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/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 fa18eb894dbeb9d2c15873575883da926bfa2538..9c315d91a07c9e4a066b76907678843606815a5e 100644
--- a/pkg/compiler/lib/src/inferrer/type_graph_nodes.dart
+++ b/pkg/compiler/lib/src/inferrer/type_graph_nodes.dart
@@ -1732,14 +1732,13 @@ 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);

Powered by Google App Engine
This is Rietveld 408576698