dart-lang / co19

A Dart language and library conformance test suite
BSD 3-Clause "New" or "Revised" License
37 stars 28 forks source link

Add more `Functions` tests #2138

Open sgrekhov opened 1 year ago

sgrekhov commented 1 year ago

Add more tests for 9. Functions

sgrekhov commented 3 days ago

There are no tests for the following statement

• of the form => e or the form async => e, which both return the value of the expression e as if by a return e. The other modifiers do not apply here, because they apply only to generators, discussed below. Generators are not allowed to explicitly return anything, objects are added to the generated stream or iterable using yield or yield*. Let T be the declared return type of the function that has this body. It is a compile-time error if one of the following conditions hold: – The function is synchronous, T is not void, and it would have been a compile-time error to declare the function with the body { return e; } rather than => e