Lines Matching refs:declarator
336 void TSChecker::InferSimpleVariableDeclaratorType(ir::VariableDeclarator *declarator)
338 ASSERT(declarator->Id()->IsIdentifier());
340 varbinder::Variable *var = declarator->Id()->AsIdentifier()->Variable();
343 if (declarator->Id()->AsIdentifier()->TypeAnnotation() != nullptr) {
344 var->SetTsType(declarator->Id()->AsIdentifier()->TypeAnnotation()->GetType(this));
348 if (declarator->Init() != nullptr) {
349 var->SetTsType(CheckTypeCached(declarator->Init()));
353 ThrowTypeError({"Variable ", declarator->Id()->AsIdentifier()->Name(), " implicitly has an any type."},
354 declarator->Id()->Start());
359 ir::AstNode *declarator =
361 ASSERT(declarator);
363 if (declarator->AsVariableDeclarator()->Id()->IsIdentifier()) {
364 InferSimpleVariableDeclaratorType(declarator->AsVariableDeclarator());
368 declarator->Check(this);