Summary: : ? operator can't find common type for interfaces
           Product: D
           Version: 1.051
          Platform: Other
        OS/Version: All
            Status: NEW
          Keywords: rejects-valid
          Severity: normal
          Priority: P2
         Component: DMD

--- Comment #0 from 2009-11-23 03:24:15 PST ---
The following fails to compile, but I think it should be allowed:

interface Root {

interface A : Root {

interface B : Root {

bool bla;

void main() {
  A a;
  B b;
  Root r;
  //this works
  r = a;
  r = b;
  //this line fails, although there's an unambiguous common type "Root"
  r = bla ? a : b;

If the compiler rejects this intentionally, this bug report is a feature

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

Reply via email to