D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 2239 - Template instantiation failure when template parameter type passed as template parameter.
Summary: Template instantiation failure when template parameter type passed as templat...
Status: RESOLVED DUPLICATE of issue 2372
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D2
Hardware: x86 Windows
: P2 normal
Assignee: No Owner
URL:
Keywords: rejects-valid
Depends on:
Blocks:
 
Reported: 2008-07-21 17:41 UTC by Simen Kjaeraas
Modified: 2015-06-09 01:20 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description Simen Kjaeraas 2008-07-21 17:41:01 UTC
struct foo(T, T a) {}

void bar(T, T a)(foo!(T, a) f) {}

void main()
{
	foo!(float, 0) f;
	bar!(float, 0)(f); // cannot implicitly convert expression (f) of type foo!(float,0) to foo!(float,A)
}

If a's type is instead set in the template definition, this compiles correctly.
Comment 1 Simen Kjaeraas 2010-06-17 10:44:15 UTC

*** This issue has been marked as a duplicate of issue 2372 ***