Skip to content

Commit fe6d1e3

Browse files
committed
fix mixin-type variable declarations, fix #496
1 parent e354f91 commit fe6d1e3

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

src/dparse/parser.d

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2410,8 +2410,7 @@ class Parser
24102410
else
24112411
{
24122412
goToBookmark(b);
2413-
error("Declaration expected");
2414-
return null;
2413+
goto type;
24152414
}
24162415
}
24172416
else

test/pass_files/mixin_types.d

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
mixin("int") variableName;
2+
void foo(mixin("int") arg) {
3+
mixin("int") localVar;
4+
}
5+
struct S {
6+
mixin("int") foo;
7+
}

0 commit comments

Comments
 (0)