mirror of
https://github.com/github/semantic.git
synced 2024-12-30 02:14:20 +03:00
Redeclare Instance members within an object frame in New
Co-Authored-By: Rick Winfrey <rick.winfrey@gmail.com>
This commit is contained in:
parent
0dc1ad4e35
commit
a6657cc679
@ -642,10 +642,16 @@ instance Evaluatable New where
|
||||
objectFrame <- newFrame objectScope (Map.singleton Superclass $ Map.singleton assocScope classFrame)
|
||||
objectVal <- object objectFrame
|
||||
|
||||
classScope <- scopeLookup classFrame
|
||||
instanceMembers <- relationsOfScope classScope Instance
|
||||
|
||||
void . withScopeAndFrame objectFrame $ do
|
||||
for_ instanceMembers $ \Data{..} -> do
|
||||
declare dataDeclaration dataRelation dataSpan dataAssociatedScope
|
||||
|
||||
let constructorName = Name.name "constructor"
|
||||
reference (Reference constructorName) (Declaration constructorName)
|
||||
constructor <- deref =<< lookupDeclaration (Declaration $ constructorName)
|
||||
constructor <- deref =<< lookupDeclaration (Declaration constructorName)
|
||||
args <- traverse eval arguments
|
||||
call constructor (objectVal : args)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user