Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
eernstg opened this issue Nov 25, 2019 · 0 comments
Closed
Assignees
Labels
type-bug Incorrect behavior (everything from a crash to more subtle misbehavior)

Comments

@eernstg
Copy link
Member

eernstg commented Nov 25, 2019

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.

@eernstg eernstg added the type-bug Incorrect behavior (everything from a crash to more subtle misbehavior) label Nov 25, 2019
@sgrekhov sgrekhov self-assigned this Nov 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type-bug Incorrect behavior (everything from a crash to more subtle misbehavior)
Projects
None yet
Development

No branches or pull requests

2 participants