Protected
Readonly
inferenceProtected
Readonly
languageProtected
Readonly
listenersProtected
Readonly
servicesRegisters an inference rule. When inferring the type for a language node, all registered inference rules are checked until the first match.
a new inference rule
Optional
boundToType: Typean optional type, if the new inference rule is dedicated for exactly this type. If the given type is removed from the type system, this rule will be automatically removed as well.
Protected
cacheProtected
cacheProtected
checkProtected
executeProtected
getInfers a type for the given language node.
the language node whose type shall be inferred
the found Type or some inference problems (might be empty), when none of the inference rules were able to infer a type
Protected
inferProtected
infer2nd step is to finally decide about the inferred type. When the 1st step returned a list of language nodes to resolve their types, this function is called in order to complete this inference rule, otherwise, this step is not called. Advantage of this step is to split it to allow a postponed inferrence of the additional language nodes by Typir. Disadvantage of this step is, that already checked TS types of languageNode cannot be reused.
the finally inferred type or a problem, why this inference rule is finally not applicable
1st step is to check, whether this inference rule is applicable to the given language node.
the language node whose type shall be inferred
Only in the case, that child language nodes are returned, the other function will be called for step 2, otherwise, it is skipped.
Protected
pendingProtected
pendingOptional
boundToType: Type
This inference rule uses multiple internal inference rules for doing the type inference. If one of the child rules returns a type, this type is the result of the composite rule. Otherwise, all problems of all child rules are returned.