Index: src/asmjs/asm-typer.cc |
diff --git a/src/asmjs/asm-typer.cc b/src/asmjs/asm-typer.cc |
index ddc5911782c155c429079f07498a91fdf12d5354..7b24e524f54173056eb582ff086b5f0989176a5d 100644 |
--- a/src/asmjs/asm-typer.cc |
+++ b/src/asmjs/asm-typer.cc |
@@ -2713,6 +2713,10 @@ AsmType* AsmTyper::ReturnTypeAnnotations(ReturnStatement* statement) { |
FAIL(statement, "Identifier in return statement is not const."); |
} |
+ if (!var_info->type()->IsReturnType()) { |
+ FAIL(statement, "Constant in return must be signed, float, or double."); |
+ } |
+ |
return var_info->type(); |
} |