Index: test/message/type-profile/collect-type-profile.js |
diff --git a/test/message/type-profile/collect-type-profile.js b/test/message/type-profile/collect-type-profile.js |
index cecd221a9d36edd055de909ecb70ec062072e0bb..881b875e13590b8fa00bb8567de054478b109357 100644 |
--- a/test/message/type-profile/collect-type-profile.js |
+++ b/test/message/type-profile/collect-type-profile.js |
@@ -46,6 +46,21 @@ function testReturnOfNonVariable() { |
return 32; |
} |
+// Return statement is reached but its expression is never really returned. |
+// TODO(franzih): The only return type should be 'string'. |
+function try_finally() { |
+ try { |
+ return 23; |
+ } finally { |
+ return "nope, string is better" |
+ } |
+} |
+ |
+try_finally(); |
+ |
+%PrintTypeProfile(try_finally); |
+ |
+ |
testReturnOfNonVariable(); |
throw "throw otherwise test fails with --stress-opt"; |