public visitClassConst ( ast\Node $node ) : |
||
$node | ast\Node | A node of the type indicated by the method name that we'd like to figure out the type that it produces. |
return | The set of types that are possibly produced by the given node |
public function visitClassConst(Node $node) : UnionType
{
$constant_name = $node->children['const'];
try {
$constant = (new ContextNode($this->code_base, $this->context, $node))->getClassConst();
return $constant->getUnionType();
} catch (NodeException $exception) {
$this->emitIssue(Issue::Unanalyzable, $node->lineno ?? 0);
}
return new UnionType();
}