[ImportVerilog] Skip defparams which have been handled by slang. (#7582)

This commit is contained in:
Hailong Sun 2024-09-04 13:16:12 +08:00 committed by GitHub
parent b441059067
commit f074d91fea
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 3 additions and 7 deletions

View File

@ -195,6 +195,9 @@ struct ModuleVisitor : public BaseVisitor {
return success();
}
// Skip defparams which have been handled by slang.
LogicalResult visit(const slang::ast::DefParamSymbol &) { return success(); }
// Ignore type parameters. These have already been handled by Slang's type
// checking.
LogicalResult visit(const slang::ast::TypeParameterSymbol &) {

View File

@ -25,13 +25,6 @@ module Foo;
initial a = b;
endmodule
// -----
module Foo;
parameter a = 1;
// expected-error @below {{unsupported module member}}
defparam a = 2;
endmodule
// -----
module Foo;
// expected-error @below {{unsupported module member}}