[Issue 10736] New: Regression (2.064 git-head): Instantiation failure triggered by module import and module order
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Wed Jul 31 13:16:15 PDT 2013
http://d.puremagic.com/issues/show_bug.cgi?id=10736
Summary: Regression (2.064 git-head): Instantiation failure
triggered by module import and module order
Product: D
Version: D2
Platform: All
OS/Version: All
Status: NEW
Severity: regression
Priority: P2
Component: DMD
AssignedTo: nobody at puremagic.com
ReportedBy: andrej.mitrovich at gmail.com
--- Comment #0 from Andrej Mitrovic <andrej.mitrovich at gmail.com> 2013-07-31 13:16:15 PDT ---
Three files:
foo\all.d:
-----
module foo.all;
import foo.array;
import foo.range;
-----
foo\array.d:
-----
module foo.array;
import std.range;
-----
foo\range.d:
-----
module foo.range;
import std.range;
void main()
{
int[] arr = [0, 1, 2, 3];
auto x = chunks(arr, 4); // error
}
-----
Compile (in this exact order):
$ dmd foo\all.d foo\array.d foo\range.d
> C:\dmd-git\dmd2\windows\bin\..\..\src\phobos\std\range.d(6543): Error: template std.range.chunks does not match any function template declaration.
If you remove the import to `std.range` inside of `foo.array`, it will compile.
$ dmd foo\all.d foo\array.d foo\range.d
>
If you instead change the compilation order so 'foo\range.d' is compiled first,
then it will also compile:
$ foo\range.d dmd foo\all.d foo\array.d
>
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list