Accepted baselines.
This commit is contained in:
parent
3cac56af1a
commit
3cd480ddb6
|
@ -11,3 +11,7 @@ module // this is the identifier 'module'
|
|||
//// [asiPreventsParsingAsAmbientExternalModule01.js]
|
||||
var declare;
|
||||
var module;
|
||||
declare; // this is the identifier 'declare'
|
||||
module; // this is the identifier 'module'
|
||||
"my external module"; // this is just a string
|
||||
{ } // this is a block body
|
||||
|
|
|
@ -7,6 +7,10 @@ var module: string;
|
|||
>module : Symbol(module, Decl(asiPreventsParsingAsAmbientExternalModule01.ts, 2, 3))
|
||||
|
||||
declare // this is the identifier 'declare'
|
||||
>declare : Symbol(declare, Decl(asiPreventsParsingAsAmbientExternalModule01.ts, 1, 3))
|
||||
|
||||
module // this is the identifier 'module'
|
||||
>module : Symbol(module, Decl(asiPreventsParsingAsAmbientExternalModule01.ts, 2, 3))
|
||||
|
||||
"my external module" // this is just a string
|
||||
{ } // this is a block body
|
||||
|
|
|
@ -7,6 +7,12 @@ var module: string;
|
|||
>module : string
|
||||
|
||||
declare // this is the identifier 'declare'
|
||||
>declare : number
|
||||
|
||||
module // this is the identifier 'module'
|
||||
>module : string
|
||||
|
||||
"my external module" // this is just a string
|
||||
>"my external module" : string
|
||||
|
||||
{ } // this is a block body
|
||||
|
|
|
@ -1,16 +0,0 @@
|
|||
tests/cases/conformance/externalModules/asiPreventsParsingAsAmbientExternalModule02.ts(8,5): error TS2435: Ambient modules cannot be nested in other modules.
|
||||
|
||||
|
||||
==== tests/cases/conformance/externalModules/asiPreventsParsingAsAmbientExternalModule02.ts (1 errors) ====
|
||||
|
||||
var declare: number;
|
||||
var module: string;
|
||||
|
||||
module container {
|
||||
declare // this is the identifier 'declare'
|
||||
module // this is the identifier 'module'
|
||||
"my external module" // this is just a string
|
||||
~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS2435: Ambient modules cannot be nested in other modules.
|
||||
{ } // this is a block body
|
||||
}
|
|
@ -13,3 +13,10 @@ module container {
|
|||
//// [asiPreventsParsingAsAmbientExternalModule02.js]
|
||||
var declare;
|
||||
var module;
|
||||
var container;
|
||||
(function (container) {
|
||||
declare; // this is the identifier 'declare'
|
||||
module; // this is the identifier 'module'
|
||||
"my external module"; // this is just a string
|
||||
{ } // this is a block body
|
||||
})(container || (container = {}));
|
||||
|
|
|
@ -0,0 +1,20 @@
|
|||
=== tests/cases/conformance/externalModules/asiPreventsParsingAsAmbientExternalModule02.ts ===
|
||||
|
||||
var declare: number;
|
||||
>declare : Symbol(declare, Decl(asiPreventsParsingAsAmbientExternalModule02.ts, 1, 3))
|
||||
|
||||
var module: string;
|
||||
>module : Symbol(module, Decl(asiPreventsParsingAsAmbientExternalModule02.ts, 2, 3))
|
||||
|
||||
module container {
|
||||
>container : Symbol(container, Decl(asiPreventsParsingAsAmbientExternalModule02.ts, 2, 19))
|
||||
|
||||
declare // this is the identifier 'declare'
|
||||
>declare : Symbol(declare, Decl(asiPreventsParsingAsAmbientExternalModule02.ts, 1, 3))
|
||||
|
||||
module // this is the identifier 'module'
|
||||
>module : Symbol(module, Decl(asiPreventsParsingAsAmbientExternalModule02.ts, 2, 3))
|
||||
|
||||
"my external module" // this is just a string
|
||||
{ } // this is a block body
|
||||
}
|
|
@ -0,0 +1,22 @@
|
|||
=== tests/cases/conformance/externalModules/asiPreventsParsingAsAmbientExternalModule02.ts ===
|
||||
|
||||
var declare: number;
|
||||
>declare : number
|
||||
|
||||
var module: string;
|
||||
>module : string
|
||||
|
||||
module container {
|
||||
>container : typeof container
|
||||
|
||||
declare // this is the identifier 'declare'
|
||||
>declare : number
|
||||
|
||||
module // this is the identifier 'module'
|
||||
>module : string
|
||||
|
||||
"my external module" // this is just a string
|
||||
>"my external module" : string
|
||||
|
||||
{ } // this is a block body
|
||||
}
|
|
@ -10,3 +10,6 @@ n // this is the identifier 'n'
|
|||
//// [asiPreventsParsingAsNamespace01.js]
|
||||
var namespace;
|
||||
var n;
|
||||
namespace; // this is the identifier 'namespace'
|
||||
n; // this is the identifier 'n'
|
||||
{ } // this is a block body
|
||||
|
|
|
@ -4,10 +4,12 @@ var namespace: number;
|
|||
>namespace : Symbol(namespace, Decl(asiPreventsParsingAsNamespace01.ts, 1, 3))
|
||||
|
||||
var n: string;
|
||||
>n : Symbol(n, Decl(asiPreventsParsingAsNamespace01.ts, 2, 3), Decl(asiPreventsParsingAsNamespace01.ts, 2, 14))
|
||||
>n : Symbol(n, Decl(asiPreventsParsingAsNamespace01.ts, 2, 3))
|
||||
|
||||
namespace // this is the identifier 'namespace'
|
||||
>namespace : Symbol(namespace, Decl(asiPreventsParsingAsNamespace01.ts, 1, 3))
|
||||
|
||||
n // this is the identifier 'n'
|
||||
>n : Symbol(n, Decl(asiPreventsParsingAsNamespace01.ts, 2, 3), Decl(asiPreventsParsingAsNamespace01.ts, 2, 14))
|
||||
>n : Symbol(n, Decl(asiPreventsParsingAsNamespace01.ts, 2, 3))
|
||||
|
||||
{ } // this is a block body
|
||||
|
|
|
@ -7,6 +7,8 @@ var n: string;
|
|||
>n : string
|
||||
|
||||
namespace // this is the identifier 'namespace'
|
||||
>namespace : number
|
||||
|
||||
n // this is the identifier 'n'
|
||||
>n : string
|
||||
|
||||
|
|
|
@ -10,3 +10,6 @@ m // this is the identifier 'm'
|
|||
//// [asiPreventsParsingAsNamespace02.js]
|
||||
var module;
|
||||
var m;
|
||||
module; // this is the identifier 'namespace'
|
||||
m; // this is the identifier 'm'
|
||||
{ } // this is a block body
|
||||
|
|
|
@ -4,10 +4,12 @@ var module: number;
|
|||
>module : Symbol(module, Decl(asiPreventsParsingAsNamespace02.ts, 1, 3))
|
||||
|
||||
var m: string;
|
||||
>m : Symbol(m, Decl(asiPreventsParsingAsNamespace02.ts, 2, 3), Decl(asiPreventsParsingAsNamespace02.ts, 2, 14))
|
||||
>m : Symbol(m, Decl(asiPreventsParsingAsNamespace02.ts, 2, 3))
|
||||
|
||||
module // this is the identifier 'namespace'
|
||||
>module : Symbol(module, Decl(asiPreventsParsingAsNamespace02.ts, 1, 3))
|
||||
|
||||
m // this is the identifier 'm'
|
||||
>m : Symbol(m, Decl(asiPreventsParsingAsNamespace02.ts, 2, 3), Decl(asiPreventsParsingAsNamespace02.ts, 2, 14))
|
||||
>m : Symbol(m, Decl(asiPreventsParsingAsNamespace02.ts, 2, 3))
|
||||
|
||||
{ } // this is a block body
|
||||
|
|
|
@ -7,6 +7,8 @@ var m: string;
|
|||
>m : string
|
||||
|
||||
module // this is the identifier 'namespace'
|
||||
>module : number
|
||||
|
||||
m // this is the identifier 'm'
|
||||
>m : string
|
||||
|
||||
|
|
|
@ -12,3 +12,9 @@ namespace container {
|
|||
//// [asiPreventsParsingAsNamespace03.js]
|
||||
var namespace;
|
||||
var n;
|
||||
var container;
|
||||
(function (container) {
|
||||
namespace; // this is the identifier 'namespace'
|
||||
n; // this is the identifier 'n'
|
||||
{ } // this is a block body
|
||||
})(container || (container = {}));
|
||||
|
|
|
@ -10,8 +10,10 @@ namespace container {
|
|||
>container : Symbol(container, Decl(asiPreventsParsingAsNamespace03.ts, 2, 14))
|
||||
|
||||
namespace // this is the identifier 'namespace'
|
||||
>namespace : Symbol(namespace, Decl(asiPreventsParsingAsNamespace03.ts, 1, 3))
|
||||
|
||||
n // this is the identifier 'n'
|
||||
>n : Symbol(n, Decl(asiPreventsParsingAsNamespace03.ts, 4, 21))
|
||||
>n : Symbol(n, Decl(asiPreventsParsingAsNamespace03.ts, 2, 3))
|
||||
|
||||
{ } // this is a block body
|
||||
}
|
||||
|
|
|
@ -7,11 +7,13 @@ var n: string;
|
|||
>n : string
|
||||
|
||||
namespace container {
|
||||
>container : any
|
||||
>container : typeof container
|
||||
|
||||
namespace // this is the identifier 'namespace'
|
||||
>namespace : number
|
||||
|
||||
n // this is the identifier 'n'
|
||||
>n : any
|
||||
>n : string
|
||||
|
||||
{ } // this is a block body
|
||||
}
|
||||
|
|
|
@ -1,9 +0,0 @@
|
|||
tests/cases/conformance/internalModules/moduleDeclarations/asiPreventsParsingAsNamespace04.ts(3,8): error TS1003: Identifier expected.
|
||||
|
||||
|
||||
==== tests/cases/conformance/internalModules/moduleDeclarations/asiPreventsParsingAsNamespace04.ts (1 errors) ====
|
||||
|
||||
let module = 10;
|
||||
module in {}
|
||||
~~
|
||||
!!! error TS1003: Identifier expected.
|
|
@ -5,4 +5,4 @@ module in {}
|
|||
|
||||
//// [asiPreventsParsingAsNamespace04.js]
|
||||
var module = 10;
|
||||
in {};
|
||||
module in {};
|
||||
|
|
|
@ -0,0 +1,8 @@
|
|||
=== tests/cases/conformance/internalModules/moduleDeclarations/asiPreventsParsingAsNamespace04.ts ===
|
||||
|
||||
let module = 10;
|
||||
>module : Symbol(module, Decl(asiPreventsParsingAsNamespace04.ts, 1, 3))
|
||||
|
||||
module in {}
|
||||
>module : Symbol(module, Decl(asiPreventsParsingAsNamespace04.ts, 1, 3))
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
=== tests/cases/conformance/internalModules/moduleDeclarations/asiPreventsParsingAsNamespace04.ts ===
|
||||
|
||||
let module = 10;
|
||||
>module : number
|
||||
>10 : number
|
||||
|
||||
module in {}
|
||||
>module in {} : boolean
|
||||
>module : number
|
||||
>{} : {}
|
||||
|
|
@ -1,6 +1,9 @@
|
|||
//// [asiPreventsParsingAsNamespace05.ts]
|
||||
|
||||
let namespace = 10;
|
||||
namespace a.b {
|
||||
export let c = 20;
|
||||
}
|
||||
|
||||
namespace
|
||||
a.b.c
|
||||
|
@ -9,3 +12,14 @@ a.b.c
|
|||
|
||||
//// [asiPreventsParsingAsNamespace05.js]
|
||||
var namespace = 10;
|
||||
var a;
|
||||
(function (a) {
|
||||
var b;
|
||||
(function (b) {
|
||||
b.c = 20;
|
||||
})(b = a.b || (a.b = {}));
|
||||
})(a || (a = {}));
|
||||
namespace;
|
||||
a.b.c;
|
||||
{
|
||||
}
|
||||
|
|
|
@ -3,10 +3,22 @@
|
|||
let namespace = 10;
|
||||
>namespace : Symbol(namespace, Decl(asiPreventsParsingAsNamespace05.ts, 1, 3))
|
||||
|
||||
namespace
|
||||
a.b.c
|
||||
namespace a.b {
|
||||
>a : Symbol(a, Decl(asiPreventsParsingAsNamespace05.ts, 1, 19))
|
||||
>b : Symbol(b, Decl(asiPreventsParsingAsNamespace05.ts, 4, 2))
|
||||
>c : Symbol(c, Decl(asiPreventsParsingAsNamespace05.ts, 4, 4))
|
||||
>b : Symbol(b, Decl(asiPreventsParsingAsNamespace05.ts, 2, 12))
|
||||
|
||||
export let c = 20;
|
||||
>c : Symbol(c, Decl(asiPreventsParsingAsNamespace05.ts, 3, 14))
|
||||
}
|
||||
|
||||
namespace
|
||||
>namespace : Symbol(namespace, Decl(asiPreventsParsingAsNamespace05.ts, 1, 3))
|
||||
|
||||
a.b.c
|
||||
>a.b.c : Symbol(a.b.c, Decl(asiPreventsParsingAsNamespace05.ts, 3, 14))
|
||||
>a.b : Symbol(a.b, Decl(asiPreventsParsingAsNamespace05.ts, 2, 12))
|
||||
>a : Symbol(a, Decl(asiPreventsParsingAsNamespace05.ts, 1, 19))
|
||||
>b : Symbol(a.b, Decl(asiPreventsParsingAsNamespace05.ts, 2, 12))
|
||||
>c : Symbol(a.b.c, Decl(asiPreventsParsingAsNamespace05.ts, 3, 14))
|
||||
{
|
||||
}
|
||||
|
|
|
@ -4,10 +4,23 @@ let namespace = 10;
|
|||
>namespace : number
|
||||
>10 : number
|
||||
|
||||
namespace a.b {
|
||||
>a : typeof a
|
||||
>b : typeof b
|
||||
|
||||
export let c = 20;
|
||||
>c : number
|
||||
>20 : number
|
||||
}
|
||||
|
||||
namespace
|
||||
>namespace : number
|
||||
|
||||
a.b.c
|
||||
>a : any
|
||||
>b : any
|
||||
>c : any
|
||||
>a.b.c : number
|
||||
>a.b : typeof a.b
|
||||
>a : typeof a
|
||||
>b : typeof a.b
|
||||
>c : number
|
||||
{
|
||||
}
|
||||
|
|
|
@ -11,3 +11,5 @@ Foo = string;
|
|||
var type;
|
||||
var string;
|
||||
var Foo;
|
||||
type;
|
||||
Foo = string;
|
||||
|
|
|
@ -7,9 +7,12 @@ var string;
|
|||
>string : Symbol(string, Decl(asiPreventsParsingAsTypeAlias01.ts, 2, 3))
|
||||
|
||||
var Foo;
|
||||
>Foo : Symbol(Foo, Decl(asiPreventsParsingAsTypeAlias01.ts, 3, 3), Decl(asiPreventsParsingAsTypeAlias01.ts, 3, 8))
|
||||
>Foo : Symbol(Foo, Decl(asiPreventsParsingAsTypeAlias01.ts, 3, 3))
|
||||
|
||||
type
|
||||
Foo = string;
|
||||
>Foo : Symbol(Foo, Decl(asiPreventsParsingAsTypeAlias01.ts, 3, 3), Decl(asiPreventsParsingAsTypeAlias01.ts, 3, 8))
|
||||
>type : Symbol(type, Decl(asiPreventsParsingAsTypeAlias01.ts, 1, 3))
|
||||
|
||||
Foo = string;
|
||||
>Foo : Symbol(Foo, Decl(asiPreventsParsingAsTypeAlias01.ts, 3, 3))
|
||||
>string : Symbol(string, Decl(asiPreventsParsingAsTypeAlias01.ts, 2, 3))
|
||||
|
||||
|
|
|
@ -10,6 +10,10 @@ var Foo;
|
|||
>Foo : any
|
||||
|
||||
type
|
||||
Foo = string;
|
||||
>Foo : string
|
||||
>type : any
|
||||
|
||||
Foo = string;
|
||||
>Foo = string : any
|
||||
>Foo : any
|
||||
>string : any
|
||||
|
||||
|
|
|
@ -13,3 +13,8 @@ namespace container {
|
|||
var type;
|
||||
var string;
|
||||
var Foo;
|
||||
var container;
|
||||
(function (container) {
|
||||
type;
|
||||
Foo = string;
|
||||
})(container || (container = {}));
|
||||
|
|
|
@ -13,6 +13,9 @@ namespace container {
|
|||
>container : Symbol(container, Decl(asiPreventsParsingAsTypeAlias02.ts, 3, 8))
|
||||
|
||||
type
|
||||
>type : Symbol(type, Decl(asiPreventsParsingAsTypeAlias02.ts, 1, 3))
|
||||
|
||||
Foo = string;
|
||||
>Foo : Symbol(Foo, Decl(asiPreventsParsingAsTypeAlias02.ts, 5, 21))
|
||||
>Foo : Symbol(Foo, Decl(asiPreventsParsingAsTypeAlias02.ts, 3, 3))
|
||||
>string : Symbol(string, Decl(asiPreventsParsingAsTypeAlias02.ts, 2, 3))
|
||||
}
|
||||
|
|
|
@ -10,9 +10,13 @@ var Foo;
|
|||
>Foo : any
|
||||
|
||||
namespace container {
|
||||
>container : any
|
||||
>container : typeof container
|
||||
|
||||
type
|
||||
>type : any
|
||||
|
||||
Foo = string;
|
||||
>Foo : string
|
||||
>Foo = string : any
|
||||
>Foo : any
|
||||
>string : any
|
||||
}
|
||||
|
|
|
@ -2,12 +2,13 @@ tests/cases/conformance/types/typeAliases/reservedNamesInAliases.ts(2,6): error
|
|||
tests/cases/conformance/types/typeAliases/reservedNamesInAliases.ts(3,6): error TS2457: Type alias name cannot be 'number'
|
||||
tests/cases/conformance/types/typeAliases/reservedNamesInAliases.ts(4,6): error TS2457: Type alias name cannot be 'boolean'
|
||||
tests/cases/conformance/types/typeAliases/reservedNamesInAliases.ts(5,6): error TS2457: Type alias name cannot be 'string'
|
||||
tests/cases/conformance/types/typeAliases/reservedNamesInAliases.ts(6,6): error TS1003: Identifier expected.
|
||||
tests/cases/conformance/types/typeAliases/reservedNamesInAliases.ts(6,11): error TS1005: ';' expected.
|
||||
tests/cases/conformance/types/typeAliases/reservedNamesInAliases.ts(6,1): error TS2304: Cannot find name 'type'.
|
||||
tests/cases/conformance/types/typeAliases/reservedNamesInAliases.ts(6,6): error TS1005: ';' expected.
|
||||
tests/cases/conformance/types/typeAliases/reservedNamesInAliases.ts(6,11): error TS1109: Expression expected.
|
||||
tests/cases/conformance/types/typeAliases/reservedNamesInAliases.ts(6,13): error TS2304: Cannot find name 'I'.
|
||||
|
||||
|
||||
==== tests/cases/conformance/types/typeAliases/reservedNamesInAliases.ts (7 errors) ====
|
||||
==== tests/cases/conformance/types/typeAliases/reservedNamesInAliases.ts (8 errors) ====
|
||||
interface I {}
|
||||
type any = I;
|
||||
~~~
|
||||
|
@ -22,9 +23,11 @@ tests/cases/conformance/types/typeAliases/reservedNamesInAliases.ts(6,13): error
|
|||
~~~~~~
|
||||
!!! error TS2457: Type alias name cannot be 'string'
|
||||
type void = I;
|
||||
~~~~
|
||||
!!! error TS2304: Cannot find name 'type'.
|
||||
~~~~
|
||||
!!! error TS1003: Identifier expected.
|
||||
~
|
||||
!!! error TS1005: ';' expected.
|
||||
~
|
||||
!!! error TS1109: Expression expected.
|
||||
~
|
||||
!!! error TS2304: Cannot find name 'I'.
|
|
@ -7,4 +7,6 @@ type string = I;
|
|||
type void = I;
|
||||
|
||||
//// [reservedNamesInAliases.js]
|
||||
type;
|
||||
void ;
|
||||
I;
|
||||
|
|
|
@ -13,8 +13,8 @@ tests/cases/compiler/reservedWords2.ts(4,12): error TS1109: Expression expected.
|
|||
tests/cases/compiler/reservedWords2.ts(5,9): error TS2300: Duplicate identifier '(Missing)'.
|
||||
tests/cases/compiler/reservedWords2.ts(5,10): error TS1003: Identifier expected.
|
||||
tests/cases/compiler/reservedWords2.ts(5,18): error TS1005: '=>' expected.
|
||||
tests/cases/compiler/reservedWords2.ts(6,7): error TS2300: Duplicate identifier '(Missing)'.
|
||||
tests/cases/compiler/reservedWords2.ts(6,8): error TS1003: Identifier expected.
|
||||
tests/cases/compiler/reservedWords2.ts(6,1): error TS2304: Cannot find name 'module'.
|
||||
tests/cases/compiler/reservedWords2.ts(6,8): error TS1005: ';' expected.
|
||||
tests/cases/compiler/reservedWords2.ts(7,11): error TS2300: Duplicate identifier '(Missing)'.
|
||||
tests/cases/compiler/reservedWords2.ts(7,11): error TS1005: ':' expected.
|
||||
tests/cases/compiler/reservedWords2.ts(7,19): error TS2300: Duplicate identifier '(Missing)'.
|
||||
|
@ -68,10 +68,10 @@ tests/cases/compiler/reservedWords2.ts(10,6): error TS1003: Identifier expected.
|
|||
~
|
||||
!!! error TS1005: '=>' expected.
|
||||
module void {}
|
||||
|
||||
!!! error TS2300: Duplicate identifier '(Missing)'.
|
||||
~~~~~~
|
||||
!!! error TS2304: Cannot find name 'module'.
|
||||
~~~~
|
||||
!!! error TS1003: Identifier expected.
|
||||
!!! error TS1005: ';' expected.
|
||||
var {while, return} = { while: 1, return: 2 };
|
||||
|
||||
!!! error TS2300: Duplicate identifier '(Missing)'.
|
||||
|
|
|
@ -23,6 +23,7 @@ var ;
|
|||
typeof ;
|
||||
10;
|
||||
throw function () { };
|
||||
module;
|
||||
void {};
|
||||
var _a = { while: 1, return: 2 }, = _a.while, = _a.return;
|
||||
var _b = { this: 1, switch: { continue: 2 } }, = _b.this, = _b.switch.continue;
|
||||
|
|
Loading…
Reference in a new issue