diff --git a/tests/cases/conformance/types/contextualTypes/commaOperator/contextuallyTypeCommaOperator01.ts b/tests/cases/conformance/types/contextualTypes/commaOperator/contextuallyTypeCommaOperator01.ts new file mode 100644 index 0000000000..f5d8326611 --- /dev/null +++ b/tests/cases/conformance/types/contextualTypes/commaOperator/contextuallyTypeCommaOperator01.ts @@ -0,0 +1,3 @@ +let x: (a: string) => string; + +x = (100, a => a); \ No newline at end of file diff --git a/tests/cases/conformance/types/contextualTypes/commaOperator/contextuallyTypeCommaOperator02.ts b/tests/cases/conformance/types/contextualTypes/commaOperator/contextuallyTypeCommaOperator02.ts new file mode 100644 index 0000000000..bd38c61677 --- /dev/null +++ b/tests/cases/conformance/types/contextualTypes/commaOperator/contextuallyTypeCommaOperator02.ts @@ -0,0 +1,6 @@ +let x: (a: string) => string; + +x = (100, a => { + const b: number = a; + return b; +}); \ No newline at end of file diff --git a/tests/cases/conformance/types/contextualTypes/logicalAnd/contextuallyTypeLogicalAnd01.ts b/tests/cases/conformance/types/contextualTypes/logicalAnd/contextuallyTypeLogicalAnd01.ts new file mode 100644 index 0000000000..2cc3d8fde2 --- /dev/null +++ b/tests/cases/conformance/types/contextualTypes/logicalAnd/contextuallyTypeLogicalAnd01.ts @@ -0,0 +1,4 @@ +let x: (a: string) => string; +let y = true; + +x = y && (a => a); \ No newline at end of file diff --git a/tests/cases/conformance/types/contextualTypes/logicalAnd/contextuallyTypeLogicalAnd02.ts b/tests/cases/conformance/types/contextualTypes/logicalAnd/contextuallyTypeLogicalAnd02.ts new file mode 100644 index 0000000000..fbd196e7b6 --- /dev/null +++ b/tests/cases/conformance/types/contextualTypes/logicalAnd/contextuallyTypeLogicalAnd02.ts @@ -0,0 +1,7 @@ +let x: (a: string) => string; +let y = true; + +x = y && (a => { + const b: number = a; + return b; +}); \ No newline at end of file