From d63b8e1e2bf4777a93ac087753df55bcd9a26796 Mon Sep 17 00:00:00 2001 From: Ron Buckton Date: Tue, 26 Jan 2016 14:51:07 -0800 Subject: [PATCH] Updated baselines --- .../asyncFunctionDeclaration15_es6.errors.txt | 29 ++++++++++--------- .../asyncImportedPromise_es6.errors.txt | 13 +++++++++ .../reference/asyncImportedPromise_es6.js | 8 ++--- .../asyncImportedPromise_es6.symbols | 20 ------------- .../reference/asyncImportedPromise_es6.types | 20 ------------- .../asyncQualifiedReturnType_es6.errors.txt | 13 +++++++++ .../asyncQualifiedReturnType_es6.symbols | 17 ----------- .../asyncQualifiedReturnType_es6.types | 17 ----------- 8 files changed, 46 insertions(+), 91 deletions(-) create mode 100644 tests/baselines/reference/asyncImportedPromise_es6.errors.txt delete mode 100644 tests/baselines/reference/asyncImportedPromise_es6.symbols delete mode 100644 tests/baselines/reference/asyncImportedPromise_es6.types create mode 100644 tests/baselines/reference/asyncQualifiedReturnType_es6.errors.txt delete mode 100644 tests/baselines/reference/asyncQualifiedReturnType_es6.symbols delete mode 100644 tests/baselines/reference/asyncQualifiedReturnType_es6.types diff --git a/tests/baselines/reference/asyncFunctionDeclaration15_es6.errors.txt b/tests/baselines/reference/asyncFunctionDeclaration15_es6.errors.txt index d014f9eecf3..7b682f9dcde 100644 --- a/tests/baselines/reference/asyncFunctionDeclaration15_es6.errors.txt +++ b/tests/baselines/reference/asyncFunctionDeclaration15_es6.errors.txt @@ -1,30 +1,33 @@ -tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration15_es6.ts(6,16): error TS1055: Type '{}' is not a valid async function return type. -tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration15_es6.ts(7,16): error TS1055: Type 'any' is not a valid async function return type. -tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration15_es6.ts(8,16): error TS1055: Type 'number' is not a valid async function return type. -tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration15_es6.ts(10,16): error TS1055: Type 'Thenable' is not a valid async function return type. +tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration15_es6.ts(6,23): error TS1064: The return type of an async function or method must be the global Promise. +tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration15_es6.ts(7,23): error TS1064: The return type of an async function or method must be the global Promise. +tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration15_es6.ts(8,23): error TS1064: The return type of an async function or method must be the global Promise. +tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration15_es6.ts(9,23): error TS1064: The return type of an async function or method must be the global Promise. +tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration15_es6.ts(10,23): error TS1064: The return type of an async function or method must be the global Promise. tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration15_es6.ts(17,16): error TS1059: Return expression in async function does not have a valid callable 'then' member. tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration15_es6.ts(23,25): error TS1058: Operand for 'await' does not have a valid callable 'then' member. -==== tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration15_es6.ts (6 errors) ==== +==== tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration15_es6.ts (7 errors) ==== declare class Thenable { then(): void; } declare let a: any; declare let obj: { then: string; }; declare let thenable: Thenable; async function fn1() { } // valid: Promise async function fn2(): { } { } // error - ~~~ -!!! error TS1055: Type '{}' is not a valid async function return type. + ~~~ +!!! error TS1064: The return type of an async function or method must be the global Promise. async function fn3(): any { } // error - ~~~ -!!! error TS1055: Type 'any' is not a valid async function return type. + ~~~ +!!! error TS1064: The return type of an async function or method must be the global Promise. async function fn4(): number { } // error - ~~~ -!!! error TS1055: Type 'number' is not a valid async function return type. + ~~~~~~ +!!! error TS1064: The return type of an async function or method must be the global Promise. async function fn5(): PromiseLike { } // error + ~~~~~~~~~~~~~~~~~ +!!! error TS1064: The return type of an async function or method must be the global Promise. async function fn6(): Thenable { } // error - ~~~ -!!! error TS1055: Type 'Thenable' is not a valid async function return type. + ~~~~~~~~ +!!! error TS1064: The return type of an async function or method must be the global Promise. async function fn7() { return; } // valid: Promise async function fn8() { return 1; } // valid: Promise async function fn9() { return null; } // valid: Promise diff --git a/tests/baselines/reference/asyncImportedPromise_es6.errors.txt b/tests/baselines/reference/asyncImportedPromise_es6.errors.txt new file mode 100644 index 00000000000..994445dbedd --- /dev/null +++ b/tests/baselines/reference/asyncImportedPromise_es6.errors.txt @@ -0,0 +1,13 @@ +tests/cases/conformance/async/es6/test.ts(3,25): error TS1064: The return type of an async function or method must be the global Promise. + + +==== tests/cases/conformance/async/es6/task.ts (0 errors) ==== + export class Task extends Promise { } + +==== tests/cases/conformance/async/es6/test.ts (1 errors) ==== + import { Task } from "./task"; + class Test { + async example(): Task { return; } + ~~~~~~~ +!!! error TS1064: The return type of an async function or method must be the global Promise. + } \ No newline at end of file diff --git a/tests/baselines/reference/asyncImportedPromise_es6.js b/tests/baselines/reference/asyncImportedPromise_es6.js index a97d59f7e64..56a41b0283f 100644 --- a/tests/baselines/reference/asyncImportedPromise_es6.js +++ b/tests/baselines/reference/asyncImportedPromise_es6.js @@ -1,12 +1,12 @@ //// [tests/cases/conformance/async/es6/asyncImportedPromise_es6.ts] //// //// [task.ts] -export class Task extends Promise { } +export class Task extends Promise { } //// [test.ts] -import { Task } from "./task"; -class Test { - async example(): Task { return; } +import { Task } from "./task"; +class Test { + async example(): Task { return; } } //// [task.js] diff --git a/tests/baselines/reference/asyncImportedPromise_es6.symbols b/tests/baselines/reference/asyncImportedPromise_es6.symbols deleted file mode 100644 index 45cf47d2b45..00000000000 --- a/tests/baselines/reference/asyncImportedPromise_es6.symbols +++ /dev/null @@ -1,20 +0,0 @@ -=== tests/cases/conformance/async/es6/task.ts === -export class Task extends Promise { } ->Task : Symbol(Task, Decl(task.ts, 0, 0)) ->T : Symbol(T, Decl(task.ts, 0, 18)) ->Promise : Symbol(Promise, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) ->T : Symbol(T, Decl(task.ts, 0, 18)) - -=== tests/cases/conformance/async/es6/test.ts === -import { Task } from "./task"; ->Task : Symbol(Task, Decl(test.ts, 0, 8)) - -class Test { ->Test : Symbol(Test, Decl(test.ts, 0, 30)) - - async example(): Task { return; } ->example : Symbol(example, Decl(test.ts, 1, 12)) ->T : Symbol(T, Decl(test.ts, 2, 18)) ->Task : Symbol(Task, Decl(test.ts, 0, 8)) ->T : Symbol(T, Decl(test.ts, 2, 18)) -} diff --git a/tests/baselines/reference/asyncImportedPromise_es6.types b/tests/baselines/reference/asyncImportedPromise_es6.types deleted file mode 100644 index 424f14b34d3..00000000000 --- a/tests/baselines/reference/asyncImportedPromise_es6.types +++ /dev/null @@ -1,20 +0,0 @@ -=== tests/cases/conformance/async/es6/task.ts === -export class Task extends Promise { } ->Task : Task ->T : T ->Promise : Promise ->T : T - -=== tests/cases/conformance/async/es6/test.ts === -import { Task } from "./task"; ->Task : typeof Task - -class Test { ->Test : Test - - async example(): Task { return; } ->example : () => Task ->T : T ->Task : Task ->T : T -} diff --git a/tests/baselines/reference/asyncQualifiedReturnType_es6.errors.txt b/tests/baselines/reference/asyncQualifiedReturnType_es6.errors.txt new file mode 100644 index 00000000000..f1d01bb2a7a --- /dev/null +++ b/tests/baselines/reference/asyncQualifiedReturnType_es6.errors.txt @@ -0,0 +1,13 @@ +tests/cases/conformance/async/es6/asyncQualifiedReturnType_es6.ts(6,21): error TS1064: The return type of an async function or method must be the global Promise. + + +==== tests/cases/conformance/async/es6/asyncQualifiedReturnType_es6.ts (1 errors) ==== + namespace X { + export class MyPromise extends Promise { + } + } + + async function f(): X.MyPromise { + ~~~~~~~~~~~~~~~~~ +!!! error TS1064: The return type of an async function or method must be the global Promise. + } \ No newline at end of file diff --git a/tests/baselines/reference/asyncQualifiedReturnType_es6.symbols b/tests/baselines/reference/asyncQualifiedReturnType_es6.symbols deleted file mode 100644 index 5d27d04ea3b..00000000000 --- a/tests/baselines/reference/asyncQualifiedReturnType_es6.symbols +++ /dev/null @@ -1,17 +0,0 @@ -=== tests/cases/conformance/async/es6/asyncQualifiedReturnType_es6.ts === -namespace X { ->X : Symbol(X, Decl(asyncQualifiedReturnType_es6.ts, 0, 0)) - - export class MyPromise extends Promise { ->MyPromise : Symbol(MyPromise, Decl(asyncQualifiedReturnType_es6.ts, 0, 13)) ->T : Symbol(T, Decl(asyncQualifiedReturnType_es6.ts, 1, 27)) ->Promise : Symbol(Promise, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) ->T : Symbol(T, Decl(asyncQualifiedReturnType_es6.ts, 1, 27)) - } -} - -async function f(): X.MyPromise { ->f : Symbol(f, Decl(asyncQualifiedReturnType_es6.ts, 3, 1)) ->X : Symbol(X, Decl(asyncQualifiedReturnType_es6.ts, 0, 0)) ->MyPromise : Symbol(X.MyPromise, Decl(asyncQualifiedReturnType_es6.ts, 0, 13)) -} diff --git a/tests/baselines/reference/asyncQualifiedReturnType_es6.types b/tests/baselines/reference/asyncQualifiedReturnType_es6.types deleted file mode 100644 index 3b438eb93b6..00000000000 --- a/tests/baselines/reference/asyncQualifiedReturnType_es6.types +++ /dev/null @@ -1,17 +0,0 @@ -=== tests/cases/conformance/async/es6/asyncQualifiedReturnType_es6.ts === -namespace X { ->X : typeof X - - export class MyPromise extends Promise { ->MyPromise : MyPromise ->T : T ->Promise : Promise ->T : T - } -} - -async function f(): X.MyPromise { ->f : () => X.MyPromise ->X : any ->MyPromise : X.MyPromise -}