Skip to content

Commit

Permalink
fix Issue 12938 - Error message mistake in out parameter with @disable
Browse files Browse the repository at this point in the history
…this
  • Loading branch information
9rnsr committed Jun 17, 2014
1 parent 25e77d3 commit 561a961
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/mtype.c
Expand Up @@ -5616,7 +5616,7 @@ Type *TypeFunction::semantic(Loc loc, Scope *sc)
tv = tv->nextOf()->toBasetype();
if (tv->ty == Tstruct && ((TypeStruct *)tv)->sym->noDefaultCtor)
{
error(loc, "cannot have out parameter of type %s because the default construction is disbaled",
error(loc, "cannot have out parameter of type %s because the default construction is disabled",
fparam->type->toChars());
errors = true;
}
Expand Down
6 changes: 3 additions & 3 deletions test/fail_compilation/fail10115.d
@@ -1,9 +1,9 @@
/*
TEST_OUTPUT:
---
fail_compilation/fail10115.d(35): Error: cannot have out parameter of type S because the default construction is disbaled
fail_compilation/fail10115.d(35): Error: cannot have out parameter of type E because the default construction is disbaled
fail_compilation/fail10115.d(35): Error: cannot have out parameter of type U because the default construction is disbaled
fail_compilation/fail10115.d(35): Error: cannot have out parameter of type S because the default construction is disabled
fail_compilation/fail10115.d(35): Error: cannot have out parameter of type E because the default construction is disabled
fail_compilation/fail10115.d(35): Error: cannot have out parameter of type U because the default construction is disabled
fail_compilation/fail10115.d(40): Error: struct fail10115.S default construction is disabled
fail_compilation/fail10115.d(41): Error: struct fail10115.S default construction is disabled
fail_compilation/fail10115.d(42): Error: union fail10115.U default construction is disabled
Expand Down
2 changes: 1 addition & 1 deletion test/fail_compilation/fail10630.d
@@ -1,7 +1,7 @@
/*
TEST_OUTPUT:
---
fail_compilation/fail10630.d(12): Error: cannot have out parameter of type S because the default construction is disbaled
fail_compilation/fail10630.d(12): Error: cannot have out parameter of type S because the default construction is disabled
---
*/

Expand Down

0 comments on commit 561a961

Please sign in to comment.