1
1
mirror of https://github.com/github/semantic.git synced 2024-12-03 00:16:52 +03:00

Set the declaration's scope in runFunction

This commit is contained in:
joshvera 2018-11-05 16:09:39 -05:00
parent 95204199fb
commit 14347215cb

View File

@ -86,12 +86,11 @@ instance ( FreeVariables term
moduleInfo <- currentModule
i <- fresh
-- TODO: Declare all params
span <- get @Span
declare (Declaration name) span Nothing
span <- ask @Span -- TODO: This is probably wrong.
currentScope' <- currentScope
let lexicalEdges = maybe mempty (Map.singleton Lexical . pure) currentScope'
scope <- newScope lexicalEdges
declare (Declaration name) span (Just scope)
withScope scope $ do
for_ params $ \name -> do