Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4871 from MartinNowak/workaround14894
workaround Issue 14894 - linkage error with mixin template in std.net.curl
- Loading branch information
Showing
4 changed files
with
38 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
module imports.test14894a; | ||
|
||
mixin template Protocol() | ||
{ | ||
void onReceive() {} | ||
} | ||
|
||
struct Foo | ||
{ | ||
mixin Protocol!(); | ||
|
||
unittest | ||
{ | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import test14894a; | ||
|
||
void main() | ||
{ | ||
Foo foo; | ||
foo.onReceive(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#!/usr/bin/env bash | ||
|
||
name=`basename $0 .sh` | ||
dir=${RESULTS_DIR}/compilable | ||
src=compilable/extra-files | ||
|
||
$DMD -c -m${MODEL} -of${dir}/${name}a${OBJ} -I${src} ${src}/${name}a.d || exit 1 | ||
|
||
$DMD -unittest -m${MODEL} -od${dir} -I${src} ${src}/${name}main.d ${dir}/${name}a${OBJ} || exit 1 | ||
|
||
rm -f ${dir}/{${name}a${OBJ} ${name}main${EXE} ${name}main${OBJ}} | ||
|
||
echo Success >${dir}/`basename $0`.out |