mirror of
https://github.com/zachjs/sv2v.git
synced 2026-09-07 02:58:49 +02:00
fix interface conversion erroneously renaming colliding pattern names
This commit is contained in:
@@ -468,7 +468,16 @@ inlineInstance global ranges modportBindings items partName
|
||||
case lookup (Bit expr Tag) exprReplacements of
|
||||
Just resolved -> replaceArrTag (replaceExpr' local elt) resolved
|
||||
Nothing -> Bit (replaceExpr' local expr) (replaceExpr' local elt)
|
||||
replaceExpr' local expr =
|
||||
replaceExpr' local (expr @ (Dot Ident{} _)) =
|
||||
case lookup expr exprReplacements of
|
||||
Just expr' -> expr'
|
||||
Nothing -> checkExprResolution local expr $
|
||||
traverseSinglyNestedExprs (replaceExprAny local) expr
|
||||
replaceExpr' local (Ident x) =
|
||||
checkExprResolution local (Ident x) (Ident x)
|
||||
replaceExpr' local expr = replaceExprAny local expr
|
||||
replaceExprAny :: Scopes Expr -> Expr -> Expr
|
||||
replaceExprAny local expr =
|
||||
case lookup expr exprReplacements of
|
||||
Just expr' -> expr'
|
||||
Nothing -> checkExprResolution local expr $
|
||||
|
||||
Reference in New Issue
Block a user