-
-
Notifications
You must be signed in to change notification settings - Fork 594
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 #2201 from rainers/fix_6461
Fix 6461 - multiple definitions with typeid and multiobj
- Loading branch information
Showing
6 changed files
with
57 additions
and
9 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,4 @@ | ||
module a; | ||
import tmpl; | ||
TypeInfo fun() { return typeid(Tmpl!int()); } | ||
|
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,4 @@ | ||
module b; | ||
import tmpl; | ||
TypeInfo fun() { return typeid(Tmpl!long()); } | ||
|
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,6 @@ | ||
import a, b; | ||
void main() { | ||
auto t1 = a.fun(); | ||
auto t2 = b.fun(); | ||
assert(t1 != t2); | ||
} |
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,4 @@ | ||
module tmpl; | ||
struct Tmpl(T) { | ||
T a; | ||
} |
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,21 @@ | ||
#!/usr/bin/env bash | ||
|
||
name=`basename $0 .sh` | ||
dir=${RESULTS_DIR}/compilable | ||
src=compilable/extra-files/test6461 | ||
|
||
if [ "${OS}" == "win32" -o "${OS}" == "win64" ]; then | ||
LIBEXT=.lib | ||
else | ||
LIBEXT=.a | ||
fi | ||
|
||
$DMD -lib -m${MODEL} -of${dir}/a${LIBEXT} -I${src} ${src}/a.d || exit 1 | ||
$DMD -lib -m${MODEL} -of${dir}/b${LIBEXT} -I${src} ${src}/b.d || exit 1 | ||
|
||
$DMD -m${MODEL} -od${dir} -I${src} ${src}/main.d ${dir}/a${LIBEXT} ${dir}/b${LIBEXT} || exit 1 | ||
|
||
rm -f ${dir}/{a${LIBEXT} b${LIBEXT} main${EXE} main${OBJ}} | ||
|
||
echo Success >${dir}/test6461.sh.out | ||
|