Skip to content

Commit

Permalink
fix mixin-type variable declarations, fix #496
Browse files Browse the repository at this point in the history
  • Loading branch information
WebFreak001 committed Jul 5, 2023
1 parent e354f91 commit fe6d1e3
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
3 changes: 1 addition & 2 deletions src/dparse/parser.d
Original file line number Diff line number Diff line change
Expand Up @@ -2410,8 +2410,7 @@ class Parser
else
{
goToBookmark(b);
error("Declaration expected");
return null;
goto type;
}
}
else
Expand Down
7 changes: 7 additions & 0 deletions test/pass_files/mixin_types.d
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
mixin("int") variableName;
void foo(mixin("int") arg) {
mixin("int") localVar;
}
struct S {
mixin("int") foo;
}

0 comments on commit fe6d1e3

Please sign in to comment.