Skip to content

Commit

Permalink
Unpacking: do not require storage classes if type is specified.
Browse files Browse the repository at this point in the history
  • Loading branch information
tgehr committed Sep 24, 2024
1 parent 3e4405d commit 457e07f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion compiler/src/dmd/parse.d
Original file line number Diff line number Diff line change
Expand Up @@ -1195,7 +1195,7 @@ class Parser(AST, Lexer = dmd.lexer.Lexer) : Lexer
{
error("`auto ref` unpacked variables are not supported");
}
if (storage_class == STC.undefined_)
if (!t && storage_class == STC.undefined_)
{
error("unpacked variables need at least one storage class, did you mean `auto %s`?", i.toChars());
}
Expand Down

0 comments on commit 457e07f

Please sign in to comment.