Summary: alias of a template cannot be used to override a
                    function required by an interface
           Product: D
           Version: 1.048
          Platform: Other
        OS/Version: Mac OS X
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD

--- Comment #0 from Fawzi Mohamed <> 2009-11-04 08:00:32 PST ---
The following shows that alias cannot be used to override a function that is
requested by an interface.
luckily the mixin does work, but I think that also the alias version should
work... (I find it cleaner)
I tested both in D1 and D2.
interface II{
    void f(int);
    void f(double);

template pr(T){
    void f(T i){
        // do something

class A:II{
    void print(T)(T i){
        // do something
        mixin pr!(int);
        mixin pr!(double);
    } else { // fails
        alias print!(int) f;
        alias print!(double) f;

Configure issuemail:
------- You are receiving this mail because: -------

Reply via email to