Skip to content

Commit

Permalink
Merge pull request #512 from BBasile/issue-510
Browse files Browse the repository at this point in the history
fix #510 - mixin template and alias
merged-on-behalf-of: BBasile <BBasile@users.noreply.github.com>
  • Loading branch information
dlang-bot authored Jul 23, 2018
2 parents e5dc996 + 0e53e96 commit 5a73968
Show file tree
Hide file tree
Showing 8 changed files with 64 additions and 4 deletions.
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

0 comments on commit 5a73968

Please sign in to comment.