pyrser/type_system/inference.py
def infer_id(self, ident, diagnostic=None):
        """
        Infer type from an ID!
        - check if ID is declarated in the scope
        - if no ID is polymorphic type
        """
        # check if ID is declared
        #defined = self.type_node.get_by_symbol_name(ident)
        defined = self.infer_node.scope_node.get_by_symbol_name(ident)
        if len(defined) > 0:
            # set from matchings declarations
            #self.type_node.update(defined)
            self.infer_node.scope_node.update(defined)
        else:
            diagnostic.notify(
                Severity.ERROR,
                "%s never declared" % self.value,
                self.info
            )
def infer_id(self, ident, diagnostic=None):
        """
        Infer type from an ID!
        - check if ID is declarated in the scope
        - if no ID is polymorphic type
        """
        # check if ID is declared
        #defined = self.type_node.get_by_symbol_name(ident)
        defined = self.infer_node.scope_node.get_by_symbol_name(ident)
        if len(defined) > 0:
            # set from matchings declarations
            #self.type_node.update(defined)
            self.infer_node.scope_node.update(defined)
        else:
            diagnostic.notify(
                Severity.ERROR,
                "%s never declared" % self.value,
                self.info
            )
Infer type from an ID!
        - check if ID is declarated in the scope
        - if no ID is polymorphic type