Summary: Cannot explicitly call final interface method,
                    ambiguous calls allowed
           Product: D
           Version: D2
          Platform: Other
        OS/Version: Windows
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD

--- Comment #0 from Andrej Mitrovic <> 2010-08-15 
10:32:38 PDT ---
Code on 2.048:

import std.stdio;

interface Timer
    final void run() { writeln(""); };

interface Application
    final void run() { writeln(""); };

class TimedApp : Timer, Application

import std.stdio;

void main()
    auto app = new TimedApp;;            // error, no Timer property;      // error, no Application property;                  // This would call if the two calls
                                // above were commented out

The comments state what happens.

Note that if I changed the order of the TimedApp signature like so:

class TimedApp : Application, Timer

then the Application's run() method would be called instead of Timer's in the call.

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

Reply via email to