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 :: ScopeGraphEff sig m => m Result
|
||||||
expectedReference = do
|
expectedReference = do
|
||||||
declare "x" (Props.Declaration ScopeGraph.Assignment ScopeGraph.Default Nothing (Span (Pos 0 0) (Pos 0 5)))
|
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))
|
let refProperties = Props.Reference ScopeGraph.Identifier ScopeGraph.Default (Span (Pos 1 0) (Pos 1 1))
|
||||||
reference "x" "x" refProperties
|
|
||||||
newReference "x" refProperties
|
newReference "x" refProperties
|
||||||
pure Complete
|
pure Complete
|
||||||
|
|
||||||
|
@ -150,7 +150,7 @@ newReference name props = do
|
|||||||
in
|
in
|
||||||
(ScopeGraph.insertScope currentAddress scope' scopeGraph)
|
(ScopeGraph.insertScope currentAddress scope' scopeGraph)
|
||||||
scopeGraph <- get @(ScopeGraph.ScopeGraph Name)
|
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)
|
Just path -> modify (\scopeGraph -> insertRef' path scopeGraph)
|
||||||
Nothing -> undefined
|
Nothing -> undefined
|
||||||
-- maybe
|
-- maybe
|
||||||
|
Loading…
Reference in New Issue
Block a user