Commit e6e62e88 by Zachary Snow

typedef conversion visits nested types in statements

parent 90de4aa1
......@@ -78,9 +78,12 @@ traverseDeclM decl = do
CommentDecl{} -> return decl'
traverseStmtM :: Stmt -> Scoper Type Stmt
traverseStmtM =
traverseStmtExprsM $ traverseNestedExprsM $
traverseExprTypesM traverseTypeM >=> traverseExprM
traverseStmtM = traverseStmtExprsM $ traverseNestedExprsM traverseStmtExprM
where
traverseStmtExprM :: Expr -> Scoper Type Expr
traverseStmtExprM =
traverseExprTypesM (traverseNestedTypesM traverseTypeM) >=>
traverseExprM
traverseTypeM :: Type -> Scoper Type Type
traverseTypeM (Alias st rs1) = do
......
package PKG;
typedef struct packed {
logic f;
} foo_t;
endpackage
module top;
typedef struct packed {
PKG::foo_t f;
} local_t;
local_t w;
initial begin
w <= local_t'(1'sb1);
$display("%b", w);
end
endmodule
module top;
reg w;
initial begin
w <= 1'b1;
$display("%b", w);
end
endmodule
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment