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 881b875e13590b8fa00bb8567de054478b109357..d6876743c6f3085e60c5224c6a3ffbf3637524ab 100644 |
--- a/test/message/type-profile/collect-type-profile.js |
+++ b/test/message/type-profile/collect-type-profile.js |
@@ -14,6 +14,10 @@ function testFunction(param, flag) { |
return second_var; |
} |
+class MyClass { |
+ constructor() {} |
+} |
+ |
%PrintTypeProfile(testFunction); |
testFunction({}); |
@@ -26,22 +30,10 @@ testFunction(undefined); |
testFunction('hello', true); |
testFunction({x: 12}, true); |
testFunction({x: 12}); |
+testFunction(new MyClass()); |
%PrintTypeProfile(testFunction); |
-class MyClass { |
- constructor() {} |
-} |
- |
- |
-function testConstructorNames(param) { |
- var my_var = param; |
-} |
- |
-testConstructorNames(new MyClass()); |
-testConstructorNames({}); |
-testConstructorNames(2); |
- |
function testReturnOfNonVariable() { |
return 32; |
} |
@@ -55,11 +47,18 @@ function try_finally() { |
return "nope, string is better" |
} |
} |
- |
try_finally(); |
- |
%PrintTypeProfile(try_finally); |
+// TODO(franzih): 'undefined' should be the return type. |
+function fall_off() { |
+ //nothing |
+} |
+fall_off(); |
+%PrintTypeProfile(fall_off); |
+ |
+ |
+ |
testReturnOfNonVariable(); |