Skip to content

Commit

Permalink
Infer types in PE expressions
Browse files Browse the repository at this point in the history
  • Loading branch information
Arsene Perard-Gayot committed Nov 24, 2017
1 parent 983163f commit 16c3ff7
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/impala/sema/infersema.cpp
Expand Up @@ -574,6 +574,8 @@ const Type* FieldDecl::infer(InferSema& sema) const { return sema.infer(ast_type
void FnDecl::infer(InferSema& sema) const {
infer_ast_type_params(sema);

sema.infer(pe_expr());

Array<const Type*> param_types(num_params());
size_t e = num_params();

Expand Down Expand Up @@ -620,6 +622,8 @@ const Type* StrExpr::infer(InferSema& sema) const {
const Type* FnExpr::infer(InferSema& sema) const {
assert(ast_type_params().empty());

sema.infer(pe_expr());

Array<const Type*> param_types(num_params());
for (size_t i = 0, e = num_params(); i != e; ++i) {
param_types[i] = sema.infer(param(i));
Expand Down

0 comments on commit 16c3ff7

Please sign in to comment.