mirror of
https://github.com/github/semantic.git
synced 2024-12-20 21:31:48 +03:00
Clean up this sketch
This commit is contained in:
parent
d0afae8cba
commit
869789ce48
@ -638,16 +638,11 @@ instance Evaluatable New where
|
||||
slot <- lookupDeclaration (Declaration name)
|
||||
classVal <- deref slot
|
||||
classFrame <- maybeM (throwEvalError $ ScopedEnvError classVal) =<< scopedEnvironment classVal
|
||||
classScope
|
||||
instanceMembers <- getRelations classScope InstanceOf
|
||||
|
||||
objectFrame <- newFrame objectScope (Map.singleton Superclass $ Map.singleton assocScope classFrame)
|
||||
objectVal <- object objectFrame
|
||||
|
||||
void . withScopeAndFrame objectFrame $ do
|
||||
for_ instanceMembers $ \member ->
|
||||
declare member span Default Nothing
|
||||
|
||||
let constructorName = Name.name "constructor"
|
||||
reference (Reference constructorName) (Declaration constructorName)
|
||||
constructor <- deref =<< lookupDeclaration (Declaration $ constructorName)
|
||||
|
Loading…
Reference in New Issue
Block a user