OLD | NEW |
(Empty) | |
| 1 library test; |
| 2 import self as self; |
| 3 import "dart:core" as core; |
| 4 |
| 5 static method main() → void { |
| 6 { |
| 7 function f<S extends core::Object>(core::int x) → core::String |
| 8 return null; |
| 9 dynamic v = f; |
| 10 v = <T extends core::Object>(core::int x) → dynamic => null; |
| 11 v = <T extends core::Object>(core::int x) → dynamic => "hello"; |
| 12 v = <T extends core::Object>(core::String x) → dynamic => "hello"; |
| 13 v = <T extends core::Object>(core::int x) → dynamic => 3; |
| 14 v = <T extends core::Object>(core::int x) → dynamic { |
| 15 return 3; |
| 16 }; |
| 17 } |
| 18 { |
| 19 function f<S extends core::Object>(core::int x) → core::String |
| 20 return null; |
| 21 dynamic v = f; |
| 22 v = <T extends core::Object>(dynamic x) → dynamic => null; |
| 23 v = <T extends core::Object>(dynamic x) → dynamic => "hello"; |
| 24 v = <T extends core::Object>(dynamic x) → dynamic => 3; |
| 25 v = <T extends core::Object>(dynamic x) → dynamic { |
| 26 return 3; |
| 27 }; |
| 28 v = <T extends core::Object>(dynamic x) → dynamic { |
| 29 return x; |
| 30 }; |
| 31 } |
| 32 { |
| 33 function f<S extends core::Object>(core::int x) → core::List<core::String> |
| 34 return null; |
| 35 dynamic v = f; |
| 36 v = <T extends core::Object>(core::int x) → dynamic => null; |
| 37 v = <T extends core::Object>(core::int x) → dynamic => <dynamic>["hello"]; |
| 38 v = <T extends core::Object>(core::String x) → dynamic => <dynamic>["hello"]
; |
| 39 v = <T extends core::Object>(core::int x) → dynamic => <dynamic>[3]; |
| 40 v = <T extends core::Object>(core::int x) → dynamic { |
| 41 return <dynamic>[3]; |
| 42 }; |
| 43 } |
| 44 { |
| 45 function int2int<S extends core::Object>(core::int x) → core::int |
| 46 return null; |
| 47 function int2String<T extends core::Object>(core::int x) → core::String |
| 48 return null; |
| 49 function string2String<T extends core::Object>(core::String x) → core::Strin
g |
| 50 return null; |
| 51 dynamic x = int2int; |
| 52 x = <T extends core::Object>(dynamic x) → dynamic => x; |
| 53 x = <T extends core::Object>(dynamic x) → dynamic => x.+(1); |
| 54 dynamic y = int2String; |
| 55 y = <T extends core::Object>(dynamic x) → dynamic => x; |
| 56 y = <T extends core::Object>(dynamic x) → dynamic => x.substring(3); |
| 57 dynamic z = string2String; |
| 58 z = <T extends core::Object>(dynamic x) → dynamic => x.substring(3); |
| 59 } |
| 60 } |
OLD | NEW |