From cd246992ed4de56d700de735a2c823bb9278bea0 Mon Sep 17 00:00:00 2001 From: Daniel Rosenwasser Date: Fri, 9 Jan 2015 14:19:24 -0800 Subject: [PATCH] Clarified comment in test. --- .../parenthesizedContexualTyping2.errors.txt | 31 ++++++++++--------- .../parenthesizedContexualTyping2.js | 6 ++-- .../parenthesizedContexualTyping2.ts | 3 +- 3 files changed, 22 insertions(+), 18 deletions(-) diff --git a/tests/baselines/reference/parenthesizedContexualTyping2.errors.txt b/tests/baselines/reference/parenthesizedContexualTyping2.errors.txt index c651110071d..e4a9f0df708 100644 --- a/tests/baselines/reference/parenthesizedContexualTyping2.errors.txt +++ b/tests/baselines/reference/parenthesizedContexualTyping2.errors.txt @@ -1,25 +1,26 @@ -tests/cases/conformance/expressions/contextualTyping/parenthesizedContexualTyping2.ts(15,21): error TS2347: Untyped function calls may not accept type arguments. -tests/cases/conformance/expressions/contextualTyping/parenthesizedContexualTyping2.ts(16,22): error TS2347: Untyped function calls may not accept type arguments. -tests/cases/conformance/expressions/contextualTyping/parenthesizedContexualTyping2.ts(17,23): error TS2347: Untyped function calls may not accept type arguments. -tests/cases/conformance/expressions/contextualTyping/parenthesizedContexualTyping2.ts(20,21): error TS2347: Untyped function calls may not accept type arguments. -tests/cases/conformance/expressions/contextualTyping/parenthesizedContexualTyping2.ts(20,64): error TS2347: Untyped function calls may not accept type arguments. -tests/cases/conformance/expressions/contextualTyping/parenthesizedContexualTyping2.ts(21,22): error TS2347: Untyped function calls may not accept type arguments. -tests/cases/conformance/expressions/contextualTyping/parenthesizedContexualTyping2.ts(21,67): error TS2347: Untyped function calls may not accept type arguments. -tests/cases/conformance/expressions/contextualTyping/parenthesizedContexualTyping2.ts(22,23): error TS2347: Untyped function calls may not accept type arguments. -tests/cases/conformance/expressions/contextualTyping/parenthesizedContexualTyping2.ts(22,69): error TS2347: Untyped function calls may not accept type arguments. -tests/cases/conformance/expressions/contextualTyping/parenthesizedContexualTyping2.ts(25,43): error TS2347: Untyped function calls may not accept type arguments. -tests/cases/conformance/expressions/contextualTyping/parenthesizedContexualTyping2.ts(26,44): error TS2347: Untyped function calls may not accept type arguments. +tests/cases/conformance/expressions/contextualTyping/parenthesizedContexualTyping2.ts(16,21): error TS2347: Untyped function calls may not accept type arguments. +tests/cases/conformance/expressions/contextualTyping/parenthesizedContexualTyping2.ts(17,22): error TS2347: Untyped function calls may not accept type arguments. +tests/cases/conformance/expressions/contextualTyping/parenthesizedContexualTyping2.ts(18,23): error TS2347: Untyped function calls may not accept type arguments. +tests/cases/conformance/expressions/contextualTyping/parenthesizedContexualTyping2.ts(21,21): error TS2347: Untyped function calls may not accept type arguments. +tests/cases/conformance/expressions/contextualTyping/parenthesizedContexualTyping2.ts(21,64): error TS2347: Untyped function calls may not accept type arguments. +tests/cases/conformance/expressions/contextualTyping/parenthesizedContexualTyping2.ts(22,22): error TS2347: Untyped function calls may not accept type arguments. +tests/cases/conformance/expressions/contextualTyping/parenthesizedContexualTyping2.ts(22,67): error TS2347: Untyped function calls may not accept type arguments. +tests/cases/conformance/expressions/contextualTyping/parenthesizedContexualTyping2.ts(23,23): error TS2347: Untyped function calls may not accept type arguments. +tests/cases/conformance/expressions/contextualTyping/parenthesizedContexualTyping2.ts(23,69): error TS2347: Untyped function calls may not accept type arguments. +tests/cases/conformance/expressions/contextualTyping/parenthesizedContexualTyping2.ts(26,43): error TS2347: Untyped function calls may not accept type arguments. tests/cases/conformance/expressions/contextualTyping/parenthesizedContexualTyping2.ts(27,44): error TS2347: Untyped function calls may not accept type arguments. -tests/cases/conformance/expressions/contextualTyping/parenthesizedContexualTyping2.ts(28,46): error TS2347: Untyped function calls may not accept type arguments. -tests/cases/conformance/expressions/contextualTyping/parenthesizedContexualTyping2.ts(28,114): error TS2347: Untyped function calls may not accept type arguments. -tests/cases/conformance/expressions/contextualTyping/parenthesizedContexualTyping2.ts(31,33): error TS2347: Untyped function calls may not accept type arguments. +tests/cases/conformance/expressions/contextualTyping/parenthesizedContexualTyping2.ts(28,44): error TS2347: Untyped function calls may not accept type arguments. +tests/cases/conformance/expressions/contextualTyping/parenthesizedContexualTyping2.ts(29,46): error TS2347: Untyped function calls may not accept type arguments. +tests/cases/conformance/expressions/contextualTyping/parenthesizedContexualTyping2.ts(29,114): error TS2347: Untyped function calls may not accept type arguments. +tests/cases/conformance/expressions/contextualTyping/parenthesizedContexualTyping2.ts(32,33): error TS2347: Untyped function calls may not accept type arguments. ==== tests/cases/conformance/expressions/contextualTyping/parenthesizedContexualTyping2.ts (15 errors) ==== // These tests ensure that in cases where it may *appear* that a value has a type, // they actually are properly being contextually typed. The way we test this is // that we invoke contextually typed arguments with type arguments. - // Since 'any' cannot be invoked with type arguments, we should get errors back. + // Since 'any' cannot be invoked with type arguments, we should get errors + // back if contextual typing is not taking effect. type FuncType = (x: (p: T) => T) => typeof x; diff --git a/tests/baselines/reference/parenthesizedContexualTyping2.js b/tests/baselines/reference/parenthesizedContexualTyping2.js index 2ce2e35c906..d5e4e0ebe8f 100644 --- a/tests/baselines/reference/parenthesizedContexualTyping2.js +++ b/tests/baselines/reference/parenthesizedContexualTyping2.js @@ -2,7 +2,8 @@ // These tests ensure that in cases where it may *appear* that a value has a type, // they actually are properly being contextually typed. The way we test this is // that we invoke contextually typed arguments with type arguments. -// Since 'any' cannot be invoked with type arguments, we should get errors back. +// Since 'any' cannot be invoked with type arguments, we should get errors +// back if contextual typing is not taking effect. type FuncType = (x: (p: T) => T) => typeof x; @@ -39,7 +40,8 @@ var obj2: ObjType = ({ x: x => (x, undefined), y: y => (y, undefined) }); // These tests ensure that in cases where it may *appear* that a value has a type, // they actually are properly being contextually typed. The way we test this is // that we invoke contextually typed arguments with type arguments. -// Since 'any' cannot be invoked with type arguments, we should get errors back. +// Since 'any' cannot be invoked with type arguments, we should get errors +// back if contextual typing is not taking effect. function fun() { var rest = []; for (var _i = 0; _i < arguments.length; _i++) { diff --git a/tests/cases/conformance/expressions/contextualTyping/parenthesizedContexualTyping2.ts b/tests/cases/conformance/expressions/contextualTyping/parenthesizedContexualTyping2.ts index 87f3dc6a580..15acbf3e134 100644 --- a/tests/cases/conformance/expressions/contextualTyping/parenthesizedContexualTyping2.ts +++ b/tests/cases/conformance/expressions/contextualTyping/parenthesizedContexualTyping2.ts @@ -1,7 +1,8 @@ // These tests ensure that in cases where it may *appear* that a value has a type, // they actually are properly being contextually typed. The way we test this is // that we invoke contextually typed arguments with type arguments. -// Since 'any' cannot be invoked with type arguments, we should get errors back. +// Since 'any' cannot be invoked with type arguments, we should get errors +// back if contextual typing is not taking effect. type FuncType = (x: (p: T) => T) => typeof x;