Index: src/asmjs/asm-typer.cc |
diff --git a/src/asmjs/asm-typer.cc b/src/asmjs/asm-typer.cc |
index 4415c30ac6a32b3c6ea59981e7aaa59d11a8f1bc..1d070a020758f086bf3d16786117df1231068ea8 100644 |
--- a/src/asmjs/asm-typer.cc |
+++ b/src/asmjs/asm-typer.cc |
@@ -1744,7 +1744,11 @@ AsmType* AsmTyper::ValidateAssignmentExpression(Assignment* assignment) { |
return value_type; |
} |
- DCHECK(target_info->type() != AsmType::None()); |
+ if (!target_info->IsMutable()) { |
+ FAIL(assignment, "Can't assign to immutable symbol."); |
+ } |
+ |
+ DCHECK_NE(AsmType::None(), target_info->type()); |
if (!value_type->IsA(target_info->type())) { |
FAIL(assignment, "Type mismatch in assignment."); |
} |