[Issue 18574] New: Unclear error message when trying to inherit from multiple classes

d-bugmail at puremagic.com d-bugmail at puremagic.com
Wed Mar 7 22:23:42 UTC 2018


https://issues.dlang.org/show_bug.cgi?id=18574

          Issue ID: 18574
           Summary: Unclear error message when trying to inherit from
                    multiple classes
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P1
         Component: dmd
          Assignee: nobody at puremagic.com
          Reporter: monkeyworks12 at hotmail.com

class Test: Foo, Bar, Baz
{
}

class Foo {}
class Bar {}
class Baz {}

Error: class `Test` base type must be interface, not Bar
Error: class `Test` base type must be interface, not Baz

I thought this error message used to be a lot better; along the lines of "D
does not support multiple inheritance. Use interfaces instead." It'd be nice if
it was changed to be clearer about what the error is.

--


More information about the Digitalmars-d-bugs mailing list