File tree Expand file tree Collapse file tree 2 files changed +6
-2
lines changed
Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -301,7 +301,11 @@ def prepare_class_def(
301301 # Set up the parent class
302302 bases = [mapper .type_to_ir [base .type ] for base in info .bases if base .type in mapper .type_to_ir ]
303303 if not all (c .is_trait for c in bases [1 :]):
304- errors .error ("Non-trait bases must appear first in parent list" , path , cdef .line )
304+ errors .error (
305+ "Multiple inheritance is not currently supported (except for traits)" ,
306+ path ,
307+ cdef .line ,
308+ )
305309 ir .traits = [c for c in bases if c .is_trait ]
306310
307311 mro = []
Original file line number Diff line number Diff line change @@ -164,7 +164,7 @@ class Trait2(Concrete2):
164164class NonExt(Concrete1): # E: Non-extension classes may not inherit from extension classes
165165 pass
166166
167- class Nope(Trait1, Concrete2): # E: Non-trait bases must appear first in parent list # E: Non-trait MRO must be linear
167+ class Nope(Trait1, Concrete2): # E: Multiple inheritance is not currently supported (except for traits) # E: Non-trait MRO must be linear
168168 pass
169169
170170@decorator
You can’t perform that action at this time.
0 commit comments