Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(11)

Unified Diff: test/message/type-profile/collect-type-profile.js

Issue 2765863002: [type-profile] Add test for return in try-finally. (Closed)
Patch Set: Fix expected output. Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | test/message/type-profile/collect-type-profile.out » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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";
« no previous file with comments | « no previous file | test/message/type-profile/collect-type-profile.out » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698