mirror of
https://github.com/github/semantic.git
synced 2024-12-27 17:05:33 +03:00
Remove extra reference call in tests
This commit is contained in:
parent
13ebd4650b
commit
284912ad21
@ -89,8 +89,7 @@ assertSimpleReference = do
|
||||
expectedReference :: ScopeGraphEff sig m => m Result
|
||||
expectedReference = do
|
||||
declare "x" (Props.Declaration ScopeGraph.Assignment ScopeGraph.Default Nothing (Span (Pos 0 0) (Pos 0 5)))
|
||||
let refProperties = Props.Reference ScopeGraph.Assignment ScopeGraph.Default (Span (Pos 0 0) (Pos 0 1))
|
||||
reference "x" "x" refProperties
|
||||
let refProperties = Props.Reference ScopeGraph.Identifier ScopeGraph.Default (Span (Pos 1 0) (Pos 1 1))
|
||||
newReference "x" refProperties
|
||||
pure Complete
|
||||
|
||||
|
@ -150,7 +150,7 @@ newReference name props = do
|
||||
in
|
||||
(ScopeGraph.insertScope currentAddress scope' scopeGraph)
|
||||
scopeGraph <- get @(ScopeGraph.ScopeGraph Name)
|
||||
case ((AdjacencyList.findPath (const Nothing) (ScopeGraph.Declaration name) currentAddress scopeGraph) :: Maybe (Scope.Path Name)) of
|
||||
case AdjacencyList.findPath (const Nothing) (ScopeGraph.Declaration name) currentAddress scopeGraph of
|
||||
Just path -> modify (\scopeGraph -> insertRef' path scopeGraph)
|
||||
Nothing -> undefined
|
||||
-- maybe
|
||||
|
Loading…
Reference in New Issue
Block a user