OLD | NEW |
1 library; | 1 library; |
2 import self as self; | 2 import self as self; |
3 import "dart:core" as core; | 3 import "dart:core" as core; |
4 | 4 |
5 static method f_1_1_no_default(dynamic a, [dynamic b = null]) → dynamic { | 5 static method f_1_1_no_default(dynamic a, [dynamic b = null]) → dynamic |
6 return a.+(b); | 6 return a.+(b); |
7 } | 7 static method f_1_1_default(dynamic a, [dynamic b = 2]) → dynamic |
8 static method f_1_1_default(dynamic a, [dynamic b = 2]) → dynamic { | |
9 return a.+(b); | 8 return a.+(b); |
10 } | 9 static method f_1_b_no_default(dynamic a, {dynamic b = null}) → dynamic |
11 static method f_1_b_no_default(dynamic a, {dynamic b = null}) → dynamic { | |
12 return a.+(b); | 10 return a.+(b); |
13 } | 11 static method f_1_b_default(dynamic a, {dynamic b = 2}) → dynamic |
14 static method f_1_b_default(dynamic a, {dynamic b = 2}) → dynamic { | |
15 return a.+(b); | 12 return a.+(b); |
16 } | |
17 static method test_1_1(core::Function f, core::bool hasDefault) → dynamic { | 13 static method test_1_1(core::Function f, core::bool hasDefault) → dynamic { |
18 dynamic result = f.call(40, 2); | 14 dynamic result = f.call(40, 2); |
19 if(!42.==(result)) | 15 if(!42.==(result)) |
20 throw "Unexpected result: ${result}"; | 16 throw "Unexpected result: ${result}"; |
21 self::test_1(f, hasDefault); | 17 self::test_1(f, hasDefault); |
22 } | 18 } |
23 static method test_1_b(core::Function f, core::bool hasDefault) → dynamic { | 19 static method test_1_b(core::Function f, core::bool hasDefault) → dynamic { |
24 dynamic result = f.call(40, b: 2); | 20 dynamic result = f.call(40, b: 2); |
25 if(!42.==(result)) | 21 if(!42.==(result)) |
26 throw "Unexpected result: ${result}"; | 22 throw "Unexpected result: ${result}"; |
(...skipping 20 matching lines...) Expand all Loading... |
47 if(!0.==(result)) | 43 if(!0.==(result)) |
48 throw "Unexpected result: ${result}."; | 44 throw "Unexpected result: ${result}."; |
49 } | 45 } |
50 } | 46 } |
51 static method main(dynamic arguments) → dynamic { | 47 static method main(dynamic arguments) → dynamic { |
52 self::test_1_1(self::f_1_1_no_default, false); | 48 self::test_1_1(self::f_1_1_no_default, false); |
53 self::test_1_1(self::f_1_1_default, true); | 49 self::test_1_1(self::f_1_1_default, true); |
54 self::test_1_b(self::f_1_b_no_default, false); | 50 self::test_1_b(self::f_1_b_no_default, false); |
55 self::test_1_b(self::f_1_b_default, true); | 51 self::test_1_b(self::f_1_b_default, true); |
56 } | 52 } |
OLD | NEW |