From 22979db64cfb53d7d73c001c15b57efbecbe4e99 Mon Sep 17 00:00:00 2001 From: Wesley Wigham Date: Sun, 3 Jan 2016 06:10:47 -0500 Subject: [PATCH] Add test --- .../typeGuards/typeGuardOfFormFunctionEquality.ts | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 tests/cases/conformance/expressions/typeGuards/typeGuardOfFormFunctionEquality.ts diff --git a/tests/cases/conformance/expressions/typeGuards/typeGuardOfFormFunctionEquality.ts b/tests/cases/conformance/expressions/typeGuards/typeGuardOfFormFunctionEquality.ts new file mode 100644 index 00000000000..baff942bb8e --- /dev/null +++ b/tests/cases/conformance/expressions/typeGuards/typeGuardOfFormFunctionEquality.ts @@ -0,0 +1,14 @@ +declare function isString1(a: number, b: Object): b is string; + +declare function isString2(a: Object): a is string; + +switch (isString1(0, "")) { + case isString2(""): + default: +} + +var x = isString1(0, "") === isString2(""); + +function isString3(a: number, b: number, c: Object): c is string { + return isString1(0, c); +}