nac3artiq: update InnerResolver's "pyid_to_type" table if class contain constructor function #309
No reviewers
Labels
No Milestone
No Assignees
1 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: M-Labs/nac3#309
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "issue-139-2"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The code below failed because the InnerResolver's 'pyid_to_type' table didn't store the type information for the classes that don't have their own constructor.
In the register step, TopLevelComposer::reigster_top_level won't return the constructor's type of the class that doesn't have a constructor and therefore the 'pyid_to_type' will not be abled to store the type information for the class (the ty is None here).
Although class without its own constructor function will inherit an init function from its base class in the analyze_top_level_class_fields_methods step, the 'pyid_to_type' table never got updated.
This change update the 'pyid_to_type' table in the InnerResolver's get_obj_type function when an init method exists in the methods list of a class definition.