[Issue 1454] IFTI cant deduce parameter if alias argument used
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Thu Feb 21 00:52:31 PST 2008
http://d.puremagic.com/issues/show_bug.cgi?id=1454
wbaxter at gmail.com changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|RESOLVED |REOPENED
Resolution|INVALID |
------- Comment #6 from wbaxter at gmail.com 2008-02-21 02:52 -------
I think maybe Burton, in trying to help, has confused the issue here.
All my initial report was saying is that if you use an alias of a template type
instead of the original type, then IFTI stops working.
Here's the example again:
This *works*:
struct Base(T) {}
void foo(T)(Base!(T) x) {}
main() {
Base!(float) b;
foo(b); OK
}
But just by making an alias of the Base type, it no longer works:
struct Base(T) {}
alias Base Alias;
void foo(T)(Alias!(T) x) {}
main() {
Base!(float) b;
foo(b); // fails!
}
Alias is supposed to be the exact same type as Base, but yet template matching
fails when that's the parameter.
I think this is a different issue from the one Burton tacked on, and from the
one you said was invalid.
--
More information about the Digitalmars-d-bugs
mailing list