Skip to content

Missing return statements in named-arguments-anywhere tests #1241

Closed
@nshahan

Description

@nshahan

It looks like there are missing return statements in the anonymous functions that appear in these test expectations:

Expect.equals("x=1, y=2, z=3", (int x, int y, {int z = 42}) {
"x=$x, y=$y, z=$z";}(1, 2, z: 3)
);
Expect.equals("x=1, y=2, z=3", (int x, int y, {int z = 42}) {
"x=$x, y=$y, z=$z";}(z: 3, 1, 2)
);
Expect.equals("x=1, y=2, z=3", (int x, int y, {int z = 42}) {
"x=$x, y=$y, z=$z";}(1, z: 3, 2)
);

Expect.equals("x=1, y=2, z=3", <T>(T x, T y, {T? z}) {
"x=$x, y=$y, z=$z";}<int>(1, 2, z: 3)
);
Expect.equals("x=1, y=2, z=3", <T>(T x, T y, {T? z}) {
"x=$x, y=$y, z=$z";}<int>(z: 3, 1, 2)
);
Expect.equals("x=1, y=2, z=3", <T>(T x, T y, {T? z}) {
"x=$x, y=$y, z=$z";}<int>(1, z: 3, 2)
);

The functions are called correctly but at runtime they return null instead of the expected String.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions