summaryrefslogtreecommitdiff
path: root/cli/tests/error_019_stack_function.ts
diff options
context:
space:
mode:
Diffstat (limited to 'cli/tests/error_019_stack_function.ts')
-rw-r--r--cli/tests/error_019_stack_function.ts10
1 files changed, 10 insertions, 0 deletions
diff --git a/cli/tests/error_019_stack_function.ts b/cli/tests/error_019_stack_function.ts
new file mode 100644
index 000000000..c5eeae8f4
--- /dev/null
+++ b/cli/tests/error_019_stack_function.ts
@@ -0,0 +1,10 @@
+function foo(): never {
+ throw new Error("function");
+}
+
+try {
+ foo();
+} catch (error) {
+ console.log(error.stack);
+ throw error;
+}