Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix #510 - mixin template and alias #512

Merged
merged 1 commit into from Jul 23, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion dsymbol
4 changes: 2 additions & 2 deletions dub.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
},
Expand Down
2 changes: 1 addition & 1 deletion libdparse
9 changes: 9 additions & 0 deletions tests/tc_named_mixin/expected1.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
identifiers
alignof k
init k
mainCharacter l
mangleof k
sideCharacter l
sizeof k
stringof k
tupleof k
8 changes: 8 additions & 0 deletions tests/tc_named_mixin/expected2.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
identifiers
a v
alignof k
init k
mangleof k
sizeof k
stringof k
tupleof k
15 changes: 15 additions & 0 deletions tests/tc_named_mixin/file1.d
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
module tc_named_mixin;

template person(){}

struct nametester
{
mixin person mainCharacter;
mixin person sideCharacter;
}

void main()
{
nametester n;
n.
}
20 changes: 20 additions & 0 deletions tests/tc_named_mixin/file2.d
Original file line number Diff line number Diff line change
@@ -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 changes: 8 additions & 0 deletions tests/tc_named_mixin/run.sh
Original file line number Diff line number Diff line change
@@ -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