Przeglądaj źródła

Update compiler.c

blueloveTH 2 dni temu
rodzic
commit
9f673a50ec
1 zmienionych plików z 4 dodań i 0 usunięć
  1. 4 0
      src/compiler/compiler.c

+ 4 - 0
src/compiler/compiler.c

@@ -2486,6 +2486,10 @@ static Error* compile_class(Compiler* self, int decorators) {
             check(EXPR(self));
             check(EXPR(self));
             has_base = true;  // [base]
             has_base = true;  // [base]
         }
         }
+        while(match(TK_COMMA)) {
+            // ignore extra bases
+            check(consume_type_hints(self));
+        }
         consume(TK_RPAREN);
         consume(TK_RPAREN);
     }
     }
     if(!has_base) {
     if(!has_base) {