4003 – The result changes only with the order of source files.

D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 4003 - The result changes only with the order of source files.
Summary: The result changes only with the order of source files.
Status: RESOLVED FIXED
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D2
Hardware: Other Windows
: P2 major
Assignee: No Owner
URL:
Keywords:
: 4294 4299 (view as issue list)
Depends on:
Blocks:
Reported: 2010年03月25日 08:54 UTC by SHOO
Modified: 2014年02月15日 02:44 UTC (History)
4 users (show)

See Also:


Attachments
Add an attachment (proposed patch, testcase, etc.)

Note You need to log in before you can comment on or make changes to this issue.
Description SHOO 2010年03月25日 08:54:01 UTC
from http://dusers.dip.jp/modules/forum/index.php?post_id=220
The bug occurred with changing the order of import, or order of files as compiler options.
------------------------
main.d
------------------------
import std.stdio;
void main(){}
------------------------
test.d
------------------------
import std.typecons;
Tuple!(string) t;
-----------------------
Case of success:
dmd -unittest test.d main.d
Case of failure:
dmd -unittest main.d test.d
std\typecons.d(424): Error: static assert (is(Tuple!(string,float) == Tuple!(string,float))) is false
std\typecons.d(413): instantiated from here: Tuple!(string,float)
...
Comment 1 Simen Kjaeraas 2010年06月08日 06:41:43 UTC
*** Issue 4294 has been marked as a duplicate of this issue. ***
Comment 2 Lars T. Kyllingstad 2010年06月08日 07:03:47 UTC
I'm raising the importance of this. Every time your program uses two Phobos modules that both import std.typecons, you risk running into this bug.
See bug 4294 for a marginally more narrow test case.
Comment 3 Walter Bright 2010年06月08日 21:49:03 UTC
http://www.dsource.org/projects/dmd/changeset/527 
Comment 4 Simen Kjaeraas 2010年06月10日 05:51:53 UTC
*** Issue 4299 has been marked as a duplicate of this issue. ***
Comment 5 github-bugzilla 2014年01月05日 12:59:53 UTC
Commit pushed to master at https://github.com/D-Programming-Language/dmd
https://github.com/D-Programming-Language/dmd/commit/79f0913b6f84ef60068079a0f18673f114cf1ef5
Remove phobos dependency from issue 4003 test case


AltStyle によって変換されたページ (->オリジナル) /