Index: tests/compiler/dart2js/subtype_test.dart |
diff --git a/tests/compiler/dart2js/subtype_test.dart b/tests/compiler/dart2js/subtype_test.dart |
index b4efe86a379b780bdadbe551b75fd428b963defd..35a46517582f585d7092c458cbe068ef433df522 100644 |
--- a/tests/compiler/dart2js/subtype_test.dart |
+++ b/tests/compiler/dart2js/subtype_test.dart |
@@ -264,6 +264,7 @@ void testCallableSubtype() { |
testFunctionSubtyping() { |
var env = new TypeEnvironment(r""" |
+ _() => null; |
void void_() {} |
void void_2() {} |
int int_() => 0; |
@@ -285,6 +286,7 @@ testFunctionSubtyping() { |
testTypedefSubtyping() { |
var env = new TypeEnvironment(r""" |
+ typedef _(); |
typedef void void_(); |
typedef void void_2(); |
typedef int int_(); |
@@ -317,6 +319,13 @@ functionSubtypingHelper(TypeEnvironment env) { |
// Function <: () -> int |
expect(false, 'Function', 'int_'); |
+ // () -> dynamic <: () -> dynamic |
+ expect(true, '_', '_'); |
+ // () -> dynamic <: () -> void |
+ expect(true, '_', 'void_'); |
+ // () -> void <: () -> dynamic |
+ expect(true, 'void_', '_'); |
+ |
// () -> int <: () -> void |
expect(true, 'int_', 'void_'); |
// () -> void <: () -> int |