Accepted new baselines.

This commit is contained in:
Daniel Rosenwasser 2015-06-04 14:37:40 -07:00
parent 047d3aef19
commit 534105cfe5
16 changed files with 64 additions and 16 deletions

View file

@ -8,3 +8,6 @@ I // This should be the identifier 'I'
//// [asiPreventsParsingAsInterface01.js]
var interface, I;
interface; // This should be the identifier 'interface'
I; // This should be the identifier 'I'
{ } // This should be a block body

View file

@ -2,10 +2,12 @@
var interface: number, I: string;
>interface : Symbol(interface, Decl(asiPreventsParsingAsInterface01.ts, 1, 3))
>I : Symbol(I, Decl(asiPreventsParsingAsInterface01.ts, 1, 22), Decl(asiPreventsParsingAsInterface01.ts, 1, 33))
>I : Symbol(I, Decl(asiPreventsParsingAsInterface01.ts, 1, 22))
interface // This should be the identifier 'interface'
>interface : Symbol(interface, Decl(asiPreventsParsingAsInterface01.ts, 1, 3))
I // This should be the identifier 'I'
>I : Symbol(I, Decl(asiPreventsParsingAsInterface01.ts, 1, 22), Decl(asiPreventsParsingAsInterface01.ts, 1, 33))
>I : Symbol(I, Decl(asiPreventsParsingAsInterface01.ts, 1, 22))
{} // This should be a block body

View file

@ -5,7 +5,9 @@ var interface: number, I: string;
>I : string
interface // This should be the identifier 'interface'
>interface : number
I // This should be the identifier 'I'
>I : I
>I : string
{} // This should be a block body

View file

@ -8,4 +8,7 @@ function f(interface: number, I: string) {
//// [asiPreventsParsingAsInterface02.js]
function f(interface, I) {
interface; // This should be the identifier 'interface'
I; // This should be the identifier 'I'
{ } // This should be a block body
}

View file

@ -3,11 +3,13 @@
function f(interface: number, I: string) {
>f : Symbol(f, Decl(asiPreventsParsingAsInterface02.ts, 0, 0))
>interface : Symbol(interface, Decl(asiPreventsParsingAsInterface02.ts, 1, 11))
>I : Symbol(I, Decl(asiPreventsParsingAsInterface02.ts, 1, 29), Decl(asiPreventsParsingAsInterface02.ts, 1, 42))
>I : Symbol(I, Decl(asiPreventsParsingAsInterface02.ts, 1, 29))
interface // This should be the identifier 'interface'
>interface : Symbol(interface, Decl(asiPreventsParsingAsInterface02.ts, 1, 11))
I // This should be the identifier 'I'
>I : Symbol(I, Decl(asiPreventsParsingAsInterface02.ts, 1, 29), Decl(asiPreventsParsingAsInterface02.ts, 1, 42))
>I : Symbol(I, Decl(asiPreventsParsingAsInterface02.ts, 1, 29))
{} // This should be a block body
}

View file

@ -6,8 +6,10 @@ function f(interface: number, I: string) {
>I : string
interface // This should be the identifier 'interface'
>interface : number
I // This should be the identifier 'I'
>I : I
>I : string
{} // This should be a block body
}

View file

@ -10,3 +10,9 @@ namespace n {
//// [asiPreventsParsingAsInterface03.js]
var interface, I;
var n;
(function (n) {
interface; // This should be the identifier 'interface'
I; // This should be the identifier 'I'
{ } // This should be a block body
})(n || (n = {}));

View file

@ -8,8 +8,10 @@ namespace n {
>n : Symbol(n, Decl(asiPreventsParsingAsInterface03.ts, 1, 33))
interface // This should be the identifier 'interface'
>interface : Symbol(interface, Decl(asiPreventsParsingAsInterface03.ts, 1, 3))
I // This should be the identifier 'I'
>I : Symbol(I, Decl(asiPreventsParsingAsInterface03.ts, 3, 13))
>I : Symbol(I, Decl(asiPreventsParsingAsInterface03.ts, 1, 22))
{} // This should be a block body
}

View file

@ -5,11 +5,13 @@ var interface: number, I: string;
>I : string
namespace n {
>n : any
>n : typeof n
interface // This should be the identifier 'interface'
>interface : number
I // This should be the identifier 'I'
>I : I
>I : string
{} // This should be a block body
}

View file

@ -10,3 +10,6 @@ I // This should be the identifier 'I'
//// [asiPreventsParsingAsInterface04.js]
var declare, interface, I;
declare; // This should be the identifier 'declare'
interface; // This should be the identifier 'interface'
I; // This should be the identifier 'I'
{ } // This should be a block body

View file

@ -3,13 +3,15 @@
var declare: boolean, interface: number, I: string;
>declare : Symbol(declare, Decl(asiPreventsParsingAsInterface04.ts, 1, 3))
>interface : Symbol(interface, Decl(asiPreventsParsingAsInterface04.ts, 1, 21))
>I : Symbol(I, Decl(asiPreventsParsingAsInterface04.ts, 1, 40), Decl(asiPreventsParsingAsInterface04.ts, 3, 7))
>I : Symbol(I, Decl(asiPreventsParsingAsInterface04.ts, 1, 40))
declare // This should be the identifier 'declare'
>declare : Symbol(declare, Decl(asiPreventsParsingAsInterface04.ts, 1, 3))
interface // This should be the identifier 'interface'
>interface : Symbol(interface, Decl(asiPreventsParsingAsInterface04.ts, 1, 21))
I // This should be the identifier 'I'
>I : Symbol(I, Decl(asiPreventsParsingAsInterface04.ts, 1, 40), Decl(asiPreventsParsingAsInterface04.ts, 3, 7))
>I : Symbol(I, Decl(asiPreventsParsingAsInterface04.ts, 1, 40))
{} // This should be a block body

View file

@ -9,7 +9,9 @@ declare // This should be the identifier 'declare'
>declare : boolean
interface // This should be the identifier 'interface'
>interface : number
I // This should be the identifier 'I'
>I : I
>I : string
{} // This should be a block body

View file

@ -1,7 +1,9 @@
tests/cases/conformance/interfaces/interfaceDeclarations/asiPreventsParsingAsInterface05.ts(3,5): error TS1212: Identifier expected. 'interface' is a reserved word in strict mode
tests/cases/conformance/interfaces/interfaceDeclarations/asiPreventsParsingAsInterface05.ts(10,1): error TS1212: Identifier expected. 'interface' is a reserved word in strict mode
tests/cases/conformance/interfaces/interfaceDeclarations/asiPreventsParsingAsInterface05.ts(11,1): error TS2304: Cannot find name 'I'.
==== tests/cases/conformance/interfaces/interfaceDeclarations/asiPreventsParsingAsInterface05.ts (1 errors) ====
==== tests/cases/conformance/interfaces/interfaceDeclarations/asiPreventsParsingAsInterface05.ts (3 errors) ====
"use strict"
var interface: number;
@ -14,5 +16,9 @@ tests/cases/conformance/interfaces/interfaceDeclarations/asiPreventsParsingAsInt
// declarations such that their identifier must follow 'interface' on the same line.
interface // This should be the identifier 'interface'
~~~~~~~~~
!!! error TS1212: Identifier expected. 'interface' is a reserved word in strict mode
I // This should be the identifier 'I'
~
!!! error TS2304: Cannot find name 'I'.
{ } // This should be a block body

View file

@ -15,3 +15,10 @@ I // This should be the identifier 'I'
//// [asiPreventsParsingAsInterface05.js]
"use strict";
var interface;
// 'interface' is a strict mode reserved word, and so it would be permissible
// to allow 'interface' and the name of the interface to be on separate lines;
// however, this complicates things, and so it is preferable to restrict interface
// declarations such that their identifier must follow 'interface' on the same line.
interface; // This should be the identifier 'interface'
I; // This should be the identifier 'I'
{ } // This should be a block body

View file

@ -2,10 +2,11 @@ tests/cases/conformance/interfaces/interfaceDeclarations/interfacesWithPredefine
tests/cases/conformance/interfaces/interfaceDeclarations/interfacesWithPredefinedTypesAsNames.ts(2,11): error TS2427: Interface name cannot be 'number'
tests/cases/conformance/interfaces/interfaceDeclarations/interfacesWithPredefinedTypesAsNames.ts(3,11): error TS2427: Interface name cannot be 'string'
tests/cases/conformance/interfaces/interfaceDeclarations/interfacesWithPredefinedTypesAsNames.ts(4,11): error TS2427: Interface name cannot be 'boolean'
tests/cases/conformance/interfaces/interfaceDeclarations/interfacesWithPredefinedTypesAsNames.ts(5,11): error TS1003: Identifier expected.
tests/cases/conformance/interfaces/interfaceDeclarations/interfacesWithPredefinedTypesAsNames.ts(5,1): error TS2304: Cannot find name 'interface'.
tests/cases/conformance/interfaces/interfaceDeclarations/interfacesWithPredefinedTypesAsNames.ts(5,11): error TS1005: ';' expected.
==== tests/cases/conformance/interfaces/interfaceDeclarations/interfacesWithPredefinedTypesAsNames.ts (5 errors) ====
==== tests/cases/conformance/interfaces/interfaceDeclarations/interfacesWithPredefinedTypesAsNames.ts (6 errors) ====
interface any { }
~~~
!!! error TS2427: Interface name cannot be 'any'
@ -19,5 +20,7 @@ tests/cases/conformance/interfaces/interfaceDeclarations/interfacesWithPredefine
~~~~~~~
!!! error TS2427: Interface name cannot be 'boolean'
interface void {}
~~~~~~~~~
!!! error TS2304: Cannot find name 'interface'.
~~~~
!!! error TS1003: Identifier expected.
!!! error TS1005: ';' expected.

View file

@ -6,4 +6,5 @@ interface boolean { }
interface void {}
//// [interfacesWithPredefinedTypesAsNames.js]
interface;
void {};