Clarified comment in test.

This commit is contained in:
Daniel Rosenwasser 2015-01-09 14:19:24 -08:00
parent f5f4e28f4f
commit cd246992ed
3 changed files with 22 additions and 18 deletions

View File

@ -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: <T>(p: T) => T) => typeof x;

View File

@ -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: <T>(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++) {

View File

@ -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: <T>(p: T) => T) => typeof x;