Improve error message when using auto declarations with explicit type.

This commit is contained in:
Christian Kamm
2009-07-14 18:24:40 +02:00
parent eb3cd8872e
commit 0075194b90

View File

@@ -748,7 +748,7 @@ void VarDeclaration::semantic(Scope *sc)
}
}
if ((storage_class & STCauto) && !inferred)
error("storage class has no effect: auto");
error("both auto and explicit type given");
if (tb->ty == Ttuple)
{ /* Instead, declare variables for each of the tuple elements