Chromium Code Reviews| Index: tests/compiler/dart2js/subtype_test.dart |
| diff --git a/tests/compiler/dart2js/subtype_test.dart b/tests/compiler/dart2js/subtype_test.dart |
| index db53398cab4baa246beec21e2bcbcade4b8b2ea8..45aa2d5ea1bada78c1045e6dc8fc7f26ec2e5fa4 100644 |
| --- a/tests/compiler/dart2js/subtype_test.dart |
| +++ b/tests/compiler/dart2js/subtype_test.dart |
| @@ -362,8 +362,10 @@ testFunctionSubtypingOptional() { |
| void void___Object([Object o]) {} |
| void void__int__int(int i1, [int i2]) {} |
| void void__int__int2(int i1, [int i2]) {} |
| + void void__int__int_int(int i1, [int i2, int i3]); |
| void void___double(double d) {} |
| void void___int_int([int i1, int i2]) {} |
| + void void___int_int_int([int i1, int i2, int i3]); |
|
karlklose
2013/04/24 11:59:20
This is not used, is it?
Johnni Winther
2013/04/25 07:54:12
Done.
|
| void void___Object_int([Object o, int i]) {} |
| """); |
| functionSubtypingOptionalHelper(env); |
| @@ -378,8 +380,10 @@ testTypedefSubtypingOptional() { |
| typedef void void___Object([Object o]); |
| typedef void void__int__int(int i1, [int i2]); |
| typedef void void__int__int2(int i1, [int i2]); |
| + typedef void void__int__int_int(int i1, [int i2, int i3]); |
| typedef void void___double(double d); |
| typedef void void___int_int([int i1, int i2]); |
| + typedef void void___int_int_int([int i1, int i2, int i3]); |
|
karlklose
2013/04/24 11:59:20
Ditto.
Johnni Winther
2013/04/25 07:54:12
Done.
|
| typedef void void___Object_int([Object o, int i]); |
| """); |
| functionSubtypingOptionalHelper(env); |
| @@ -396,7 +400,7 @@ functionSubtypingOptionalHelper(TypeEnvironment env) { |
| // Test ([int])->void <: ()->void. |
| expect(true, 'void___int', 'void_'); |
| // Test ([int])->void <: (int)->void. |
| - expect(false, 'void___int', 'void__int'); |
| + expect(true, 'void___int', 'void__int'); |
| // Test (int)->void <: ([int])->void. |
| expect(false, 'void__int', 'void___int'); |
| // Test ([int])->void <: ([int])->void. |
| @@ -407,6 +411,14 @@ functionSubtypingOptionalHelper(TypeEnvironment env) { |
| expect(true, 'void___int', 'void___Object'); |
| // Test (int,[int])->void <: (int,[int])->void. |
| expect(true, 'void__int__int', 'void__int__int2'); |
| + // Test (int)->void <: ([int])->void. |
| + expect(false, 'void__int', 'void___int'); |
| + // Test ([int,int])->void <: (int)->void. |
| + expect(true, 'void___int_int', 'void__int'); |
| + // Test ([int,int])->void <: (int,[int])->void. |
| + expect(true, 'void___int_int', 'void__int__int'); |
| + // Test ([int,int])->void <: (int,[int,int])->void. |
| + expect(false, 'void___int_int', 'void__int__int_int'); |
| // Test ([int])->void <: ([double])->void. |
| expect(false, 'void___int', 'void___double'); |
| // Test ([int])->void <: ([int,int])->void. |