Index: src/ast/scopeinfo.cc |
diff --git a/src/ast/scopeinfo.cc b/src/ast/scopeinfo.cc |
index 3a3ea031893bca06afedc53476d5bc3f61d67a6b..da0dd76635d3df280f219428551dedab4fcb2788 100644 |
--- a/src/ast/scopeinfo.cc |
+++ b/src/ast/scopeinfo.cc |
@@ -143,13 +143,15 @@ Handle<ScopeInfo> ScopeInfo::Create(Isolate* isolate, Zone* zone, Scope* scope, |
bool has_simple_parameters = false; |
bool asm_module = false; |
bool asm_function = false; |
- FunctionKind function_kind = kNormalFunction; |
if (scope->is_function_scope()) { |
DeclarationScope* function_scope = scope->AsDeclarationScope(); |
has_simple_parameters = function_scope->has_simple_parameters(); |
asm_module = function_scope->asm_module(); |
asm_function = function_scope->asm_function(); |
- function_kind = function_scope->function_kind(); |
+ } |
+ FunctionKind function_kind = kNormalFunction; |
+ if (scope->is_declaration_scope()) { |
+ function_kind = scope->AsDeclarationScope()->function_kind(); |
} |
// Encode the flags. |