Skip to content

Commit

Permalink
[trivial] Fix foreach range tuple element error message
Browse files Browse the repository at this point in the history
  • Loading branch information
ntrel authored and dlang-bot committed Jun 28, 2024
1 parent c29c71c commit be5dd7c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion compiler/src/dmd/statementsem.d
Original file line number Diff line number Diff line change
Expand Up @@ -1381,7 +1381,7 @@ Statement statementSemanticVisit(Statement s, Scope* sc)
p.type = p.type.addStorageClass(sc).typeSemantic(loc, sc2);
if (!exp.implicitConvTo(p.type))
{
error(fs.loc, "cannot implicilty convert range element of type `%s` to variable `%s` of type `%s`",
error(fs.loc, "cannot implicitly convert tuple element of type `%s` to variable `%s` of type `%s`",
exp.type.toChars(), p.toChars(), p.type.toChars());
return retError();
}
Expand Down
2 changes: 1 addition & 1 deletion compiler/test/fail_compilation/fail13577.d
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
/*
TEST_OUTPUT:
---
fail_compilation/fail13577.d(27): Error: cannot implicilty convert range element of type `int[]` to variable `x` of type `immutable(int[])`
fail_compilation/fail13577.d(27): Error: cannot implicitly convert tuple element of type `int[]` to variable `x` of type `immutable(int[])`
---
*/

Expand Down

0 comments on commit be5dd7c

Please sign in to comment.