blob: 5c6899ab7d9b0608c084a4d18a4a1288adf3a02e [file] [log] [blame]
40 columns |
### Tests for anonymous function expressions: "lambdas".
>>> Generic.
f = < T , S extends T > ( T param ) { } ;
<<<
f = <T, S extends T>(T param) {};
>>> Async with block body.
f = ( ) async { } ;
<<<
f = () async {};
>>> Async with expression body.
f = ( ) async => 1;
<<<
f = () async => 1;
>>> Sync* with block body.
f = ( ) sync * { } ;
<<<
f = () sync* {};
>>> Sync* with expression body.
f = ( ) sync * => 1;
<<<
f = () sync* => 1;
>>> Aync* with block body.
f = ( ) async * { } ;
<<<
f = () async* {};
>>> Aync* with expression body.
f = ( ) async * => 1;
<<<
f = () async* => 1;
>>> Split parameter list.
function = (int firstArgument, int secondArgument) { print('42'); };
<<<
function = (
int firstArgument,
int secondArgument,
) {
print('42');
};