diff --git a/elab_scope.cc b/elab_scope.cc index 716c3bed4..7b380ec5a 100644 --- a/elab_scope.cc +++ b/elab_scope.cc @@ -513,29 +513,6 @@ static void elaborate_scope_class(Design*des, NetScope*scope, PClass*pclass) } elaborate_scope_enumerations(des, class_scope, pclass->enum_sets); - // Collect the properties, elaborate them, and add them to the - // elaborated class definition. - for (map::iterator cur = use_type->properties.begin() - ; cur != use_type->properties.end() ; ++ cur) { - - ivl_type_t tmp = cur->second.type->elaborate_type(des, class_scope); - ivl_assert(*pclass, tmp); - if (debug_scopes) { - cerr << pclass->get_fileline() << ": elaborate_scope_class: " - << " Property " << cur->first - << " type=" << *tmp << endl; - } - - if (dynamic_cast (tmp)) { - cerr << cur->second.get_fileline() << ": sorry: " - << "Queues inside classes are not yet supported." << endl; - des->errors++; - } - - use_class->set_property(cur->first, cur->second.qual, tmp); - - } - for (map::iterator cur = pclass->tasks.begin() ; cur != pclass->tasks.end() ; ++cur) { diff --git a/elab_sig.cc b/elab_sig.cc index 924fdb945..5016c48e7 100644 --- a/elab_sig.cc +++ b/elab_sig.cc @@ -374,9 +374,25 @@ bool Module::elaborate_sig(Design*des, NetScope*scope) const void netclass_t::elaborate_sig(Design*des, PClass*pclass) { + // Collect the properties, elaborate them, and add them to the + // elaborated class definition. for (map::iterator cur = pclass->type->properties.begin() ; cur != pclass->type->properties.end() ; ++ cur) { + ivl_type_t use_type = cur->second.type->elaborate_type(des, class_scope_); + if (debug_scopes) { + cerr << pclass->get_fileline() << ": elaborate_scope_class: " + << " Property " << cur->first + << " type=" << *use_type << endl; + } + + if (dynamic_cast (use_type)) { + cerr << cur->second.get_fileline() << ": sorry: " + << "Queues inside classes are not yet supported." << endl; + des->errors++; + } + set_property(cur->first, cur->second.qual, use_type); + if (! cur->second.qual.test_static()) continue; @@ -388,7 +404,6 @@ void netclass_t::elaborate_sig(Design*des, PClass*pclass) } list nil_list; - ivl_type_t use_type = cur->second.type->elaborate_type(des, class_scope_); /* NetNet*sig = */ new NetNet(class_scope_, cur->first, NetNet::REG, nil_list, use_type); }