mirror of
https://github.com/github/semantic.git
synced 2024-12-20 13:21:59 +03:00
Use maybeLookupDeclaration
Since self isn't necessarily defined for all languages.
This commit is contained in:
parent
9be3403d21
commit
493a69b8c5
@ -111,8 +111,8 @@ instance ( FreeVariables term
|
||||
withScopeAndFrame frameAddress $ do
|
||||
case maybeThis of
|
||||
Just object -> do
|
||||
slot <- lookupDeclaration (Declaration __semantic_self)
|
||||
assign slot object
|
||||
maybeSlot <- maybeLookupDeclaration (Declaration __semantic_self)
|
||||
maybe (pure ()) (`assign` object) maybeSlot
|
||||
Nothing -> pure ()
|
||||
for_ (zip names params) $ \(name, param) -> do
|
||||
addr <- lookupDeclaration (Declaration name)
|
||||
|
Loading…
Reference in New Issue
Block a user