Skip to content

co19_2/Language/Statements/Return/many_return_statements_t01 expectation #503

Closed
@eernstg

Description

@eernstg

Said test expects that it is a static warning (later it was an error) to have a return and a return e statement in the same function, with any return type.

That warning/error was eliminated (cf. dart-lang/sdk#39476 (comment)), and currently the relationship between the function return type and the return statement determines whether each return statement is an error, with no reference to the existence and shape of other return statements.

In this particular test the return type is dynamic, which means that neither return; nor return 1; is an error, so the expectation of the test should be adjusted accordingly.

There is at least one more test ('...t02') with a similar issue.

Metadata

Metadata

Assignees

Labels

type-bugIncorrect behavior (everything from a crash to more subtle misbehavior)

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions