diff --git a/elab_scope.cc b/elab_scope.cc index c1b8546dd..b01aa1700 100644 --- a/elab_scope.cc +++ b/elab_scope.cc @@ -514,7 +514,7 @@ static void elaborate_scope_class(Design*des, NetScope*scope, PClass*pclass) netclass_t*use_base_class = 0; if (base_class) { - use_base_class = scope->find_class(des, base_class->name); + use_base_class = base_class->save_elaborated_type; if (use_base_class == 0) { cerr << pclass->get_fileline() << ": error: " << "Base class " << base_class->name diff --git a/parse.y b/parse.y index f536e161d..b11f4aa56 100644 --- a/parse.y +++ b/parse.y @@ -851,17 +851,13 @@ class_declaration_endlabel_opt a data_type. */ class_declaration_extends_opt /* IEEE1800-2005: A.1.2 */ - : K_extends TYPE_IDENTIFIER - { pform_set_type_referenced(@2, $2.text); - $$.type = $2.type; - $$.exprs= 0; - delete[]$2.text; + : K_extends ps_type_identifier + { $$.type = $2; + $$.exprs = 0; } - | K_extends TYPE_IDENTIFIER '(' expression_list_with_nuls ')' - { pform_set_type_referenced(@2, $2.text); - $$.type = $2.type; + | K_extends ps_type_identifier '(' expression_list_with_nuls ')' + { $$.type = $2; $$.exprs = $4; - delete[]$2.text; } | { $$.type = 0; $$.exprs = 0; }