[Issue 12111] New: Cannot pull a function template into an overload set
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sat Feb 8 12:46:26 PST 2014
https://d.puremagic.com/issues/show_bug.cgi?id=12111
Summary: Cannot pull a function template into an overload set
Product: D
Version: unspecified
Platform: All
OS/Version: All
Status: NEW
Severity: major
Priority: P2
Component: DMD
AssignedTo: nobody at puremagic.com
ReportedBy: cbkbbejeap at mailinator.com
--- Comment #0 from Nick Sabalausky <cbkbbejeap at mailinator.com> 2014-02-08 12:46:24 PST ---
Works with regular functions, but not function templates:
------------------------------
module a;
import b;
alias foo = b.foo;
void foo(T)(T t) if(is(T==char)) {}
void main() { foo(1); }
------------------------------
module b;
void foo(T)(T t) if(is(T==int)) {}
------------------------------
Error: template a.foo(T)(T t) if (is(T == char)) conflicts with alias a.foo at
a.d(4)
FWIW, The problem does not appear to be related to the "if(...)" constraints,
because using these foo's has the same problem:
void foo(T)(int[T] t) {}
void foo(T)(T[] t) {}
--
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list