diff --git a/src/Data/Syntax/Statement.hs b/src/Data/Syntax/Statement.hs index 5cd8330d1..bf7135db5 100644 --- a/src/Data/Syntax/Statement.hs +++ b/src/Data/Syntax/Statement.hs @@ -146,9 +146,11 @@ instance Evaluatable Assignment where case declaredName (subterm assignmentValue) of Just rhsName -> do assocScope <- associatedScope (Declaration rhsName) - let edges = maybe mempty (Map.singleton I . pure) assocScope - objectScope <- newScope edges - putDeclarationScope (Declaration name) objectScope + case assocScope of + Just assocScope' -> do + objectScope <- newScope (Map.singleton I [ assocScope' ]) + putDeclarationScope (Declaration name) objectScope + Nothing -> pure () Nothing -> -- The rhs wasn't assigned to a reference/declaration. pure ()