fix #510 - mixin template and alias

This commit is contained in:
Basile Burg 2018-07-20 00:50:51 +02:00
parent e5dc9960a3
commit 0e53e96c4e
8 changed files with 64 additions and 4 deletions

@ -1 +1 @@
Subproject commit 3f7eaa1b1e6dd0c5e14d500d0b3d4ba1e1e41138
Subproject commit c30ce051314c73f37c56f55898512bc35522d8e6

View File

@ -7,8 +7,8 @@
],
"license": "GPL-3.0",
"dependencies": {
"dsymbol": "~>0.3.10",
"libdparse": "~>0.8.7",
"dsymbol": "~>0.3.12",
"libdparse": "~>0.8.8",
"msgpack-d": "~>1.0.0-beta.3",
"stdx-allocator": "~>2.77.2"
},

@ -1 +1 @@
Subproject commit 086cf06051bb1f33c94891ba6c39a57f164ee296
Subproject commit 5980238fff40e5623b03e04c05648a73d5b64c54

View File

@ -0,0 +1,9 @@
identifiers
alignof k
init k
mainCharacter l
mangleof k
sideCharacter l
sizeof k
stringof k
tupleof k

View File

@ -0,0 +1,8 @@
identifiers
a v
alignof k
init k
mangleof k
sizeof k
stringof k
tupleof k

View File

@ -0,0 +1,15 @@
module tc_named_mixin;
template person(){}
struct nametester
{
mixin person mainCharacter;
mixin person sideCharacter;
}
void main()
{
nametester n;
n.
}

View File

@ -0,0 +1,20 @@
module file2;
struct Foo
{
template Deep()
{
int a;
}
}
struct Bar
{
mixin Foo.Deep d;
}
void main()
{
Bar bar;
bar.d.
}

8
tests/tc_named_mixin/run.sh Executable file
View File

@ -0,0 +1,8 @@
set -e
set -u
../../bin/dcd-client $1 file1.d -c171 > actual1.txt
diff actual1.txt expected1.txt
../../bin/dcd-client $1 file2.d -c153 > actual2.txt
diff actual2.txt expected2.txt