153 lines
No EOL
10 KiB
Text
153 lines
No EOL
10 KiB
Text
tests/cases/compiler/strictModeReservedWord.ts(5,9): error TS1212: Identifier expected. 'public' is a reserved word in strict mode
|
|
tests/cases/compiler/strictModeReservedWord.ts(6,9): error TS1212: Identifier expected. 'static' is a reserved word in strict mode
|
|
tests/cases/compiler/strictModeReservedWord.ts(7,9): error TS1212: Identifier expected. 'let' is a reserved word in strict mode
|
|
tests/cases/compiler/strictModeReservedWord.ts(8,9): error TS1212: Identifier expected. 'package' is a reserved word in strict mode
|
|
tests/cases/compiler/strictModeReservedWord.ts(8,9): error TS2300: Duplicate identifier 'package'.
|
|
tests/cases/compiler/strictModeReservedWord.ts(9,14): error TS1212: Identifier expected. 'package' is a reserved word in strict mode
|
|
tests/cases/compiler/strictModeReservedWord.ts(9,14): error TS2300: Duplicate identifier 'package'.
|
|
tests/cases/compiler/strictModeReservedWord.ts(10,18): error TS1212: Identifier expected. 'private' is a reserved word in strict mode
|
|
tests/cases/compiler/strictModeReservedWord.ts(10,27): error TS1212: Identifier expected. 'implements' is a reserved word in strict mode
|
|
tests/cases/compiler/strictModeReservedWord.ts(10,39): error TS1212: Identifier expected. 'let' is a reserved word in strict mode
|
|
tests/cases/compiler/strictModeReservedWord.ts(11,18): error TS1212: Identifier expected. 'implements' is a reserved word in strict mode
|
|
tests/cases/compiler/strictModeReservedWord.ts(11,30): error TS1212: Identifier expected. 'protected' is a reserved word in strict mode
|
|
tests/cases/compiler/strictModeReservedWord.ts(12,24): error TS1212: Identifier expected. 'private' is a reserved word in strict mode
|
|
tests/cases/compiler/strictModeReservedWord.ts(12,33): error TS1212: Identifier expected. 'public' is a reserved word in strict mode
|
|
tests/cases/compiler/strictModeReservedWord.ts(12,41): error TS1212: Identifier expected. 'package' is a reserved word in strict mode
|
|
tests/cases/compiler/strictModeReservedWord.ts(13,11): error TS1212: Identifier expected. 'private' is a reserved word in strict mode
|
|
tests/cases/compiler/strictModeReservedWord.ts(13,20): error TS1212: Identifier expected. 'public' is a reserved word in strict mode
|
|
tests/cases/compiler/strictModeReservedWord.ts(13,28): error TS1212: Identifier expected. 'package' is a reserved word in strict mode
|
|
tests/cases/compiler/strictModeReservedWord.ts(15,25): error TS1213: Identifier expected. 'package' is a reserved word in strict mode. Class definitions are automatically in strict mode.
|
|
tests/cases/compiler/strictModeReservedWord.ts(15,25): error TS9003: 'class' expressions are not currently supported.
|
|
tests/cases/compiler/strictModeReservedWord.ts(15,41): error TS1213: Identifier expected. 'public' is a reserved word in strict mode. Class definitions are automatically in strict mode.
|
|
tests/cases/compiler/strictModeReservedWord.ts(17,9): error TS2300: Duplicate identifier 'b'.
|
|
tests/cases/compiler/strictModeReservedWord.ts(17,12): error TS1212: Identifier expected. 'public' is a reserved word in strict mode
|
|
tests/cases/compiler/strictModeReservedWord.ts(17,12): error TS2503: Cannot find namespace 'public'.
|
|
tests/cases/compiler/strictModeReservedWord.ts(19,21): error TS1212: Identifier expected. 'private' is a reserved word in strict mode
|
|
tests/cases/compiler/strictModeReservedWord.ts(19,21): error TS2503: Cannot find namespace 'private'.
|
|
tests/cases/compiler/strictModeReservedWord.ts(20,22): error TS1212: Identifier expected. 'private' is a reserved word in strict mode
|
|
tests/cases/compiler/strictModeReservedWord.ts(20,22): error TS2503: Cannot find namespace 'private'.
|
|
tests/cases/compiler/strictModeReservedWord.ts(20,30): error TS1212: Identifier expected. 'package' is a reserved word in strict mode
|
|
tests/cases/compiler/strictModeReservedWord.ts(21,22): error TS1212: Identifier expected. 'private' is a reserved word in strict mode
|
|
tests/cases/compiler/strictModeReservedWord.ts(21,22): error TS2503: Cannot find namespace 'private'.
|
|
tests/cases/compiler/strictModeReservedWord.ts(21,30): error TS1212: Identifier expected. 'package' is a reserved word in strict mode
|
|
tests/cases/compiler/strictModeReservedWord.ts(21,38): error TS1212: Identifier expected. 'protected' is a reserved word in strict mode
|
|
tests/cases/compiler/strictModeReservedWord.ts(22,9): error TS2300: Duplicate identifier 'b'.
|
|
tests/cases/compiler/strictModeReservedWord.ts(22,12): error TS1212: Identifier expected. 'interface' is a reserved word in strict mode
|
|
tests/cases/compiler/strictModeReservedWord.ts(22,12): error TS2503: Cannot find namespace 'interface'.
|
|
tests/cases/compiler/strictModeReservedWord.ts(22,22): error TS1212: Identifier expected. 'package' is a reserved word in strict mode
|
|
tests/cases/compiler/strictModeReservedWord.ts(22,30): error TS1212: Identifier expected. 'implements' is a reserved word in strict mode
|
|
tests/cases/compiler/strictModeReservedWord.ts(23,5): error TS2304: Cannot find name 'ublic'.
|
|
tests/cases/compiler/strictModeReservedWord.ts(24,5): error TS1212: Identifier expected. 'static' is a reserved word in strict mode
|
|
tests/cases/compiler/strictModeReservedWord.ts(24,5): error TS2349: Cannot invoke an expression whose type lacks a call signature.
|
|
|
|
|
|
==== tests/cases/compiler/strictModeReservedWord.ts (41 errors) ====
|
|
let let = 10;
|
|
|
|
function foo() {
|
|
"use strict"
|
|
var public = 10;
|
|
~~~~~~
|
|
!!! error TS1212: Identifier expected. 'public' is a reserved word in strict mode
|
|
var static = "hi";
|
|
~~~~~~
|
|
!!! error TS1212: Identifier expected. 'static' is a reserved word in strict mode
|
|
let let = "blah";
|
|
~~~
|
|
!!! error TS1212: Identifier expected. 'let' is a reserved word in strict mode
|
|
var package = "hello"
|
|
~~~~~~~
|
|
!!! error TS1212: Identifier expected. 'package' is a reserved word in strict mode
|
|
~~~~~~~
|
|
!!! error TS2300: Duplicate identifier 'package'.
|
|
function package() { }
|
|
~~~~~~~
|
|
!!! error TS1212: Identifier expected. 'package' is a reserved word in strict mode
|
|
~~~~~~~
|
|
!!! error TS2300: Duplicate identifier 'package'.
|
|
function bar(private, implements, let) { }
|
|
~~~~~~~
|
|
!!! error TS1212: Identifier expected. 'private' is a reserved word in strict mode
|
|
~~~~~~~~~~
|
|
!!! error TS1212: Identifier expected. 'implements' is a reserved word in strict mode
|
|
~~~
|
|
!!! error TS1212: Identifier expected. 'let' is a reserved word in strict mode
|
|
function baz<implements, protected>() { }
|
|
~~~~~~~~~~
|
|
!!! error TS1212: Identifier expected. 'implements' is a reserved word in strict mode
|
|
~~~~~~~~~
|
|
!!! error TS1212: Identifier expected. 'protected' is a reserved word in strict mode
|
|
function barn(cb: (private, public, package) => void) { }
|
|
~~~~~~~
|
|
!!! error TS1212: Identifier expected. 'private' is a reserved word in strict mode
|
|
~~~~~~
|
|
!!! error TS1212: Identifier expected. 'public' is a reserved word in strict mode
|
|
~~~~~~~
|
|
!!! error TS1212: Identifier expected. 'package' is a reserved word in strict mode
|
|
barn((private, public, package) => { });
|
|
~~~~~~~
|
|
!!! error TS1212: Identifier expected. 'private' is a reserved word in strict mode
|
|
~~~~~~
|
|
!!! error TS1212: Identifier expected. 'public' is a reserved word in strict mode
|
|
~~~~~~~
|
|
!!! error TS1212: Identifier expected. 'package' is a reserved word in strict mode
|
|
|
|
var myClass = class package extends public {}
|
|
~~~~~~~
|
|
!!! error TS1213: Identifier expected. 'package' is a reserved word in strict mode. Class definitions are automatically in strict mode.
|
|
~~~~~~~
|
|
!!! error TS9003: 'class' expressions are not currently supported.
|
|
~~~~~~
|
|
!!! error TS1213: Identifier expected. 'public' is a reserved word in strict mode. Class definitions are automatically in strict mode.
|
|
|
|
var b: public.bar;
|
|
~
|
|
!!! error TS2300: Duplicate identifier 'b'.
|
|
~~~~~~
|
|
!!! error TS1212: Identifier expected. 'public' is a reserved word in strict mode
|
|
~~~~~~
|
|
!!! error TS2503: Cannot find namespace 'public'.
|
|
|
|
function foo(x: private.x) { }
|
|
~~~~~~~
|
|
!!! error TS1212: Identifier expected. 'private' is a reserved word in strict mode
|
|
~~~~~~~
|
|
!!! error TS2503: Cannot find namespace 'private'.
|
|
function foo1(x: private.package.x) { }
|
|
~~~~~~~
|
|
!!! error TS1212: Identifier expected. 'private' is a reserved word in strict mode
|
|
~~~~~~~
|
|
!!! error TS2503: Cannot find namespace 'private'.
|
|
~~~~~~~
|
|
!!! error TS1212: Identifier expected. 'package' is a reserved word in strict mode
|
|
function foo2(x: private.package.protected) { }
|
|
~~~~~~~
|
|
!!! error TS1212: Identifier expected. 'private' is a reserved word in strict mode
|
|
~~~~~~~
|
|
!!! error TS2503: Cannot find namespace 'private'.
|
|
~~~~~~~
|
|
!!! error TS1212: Identifier expected. 'package' is a reserved word in strict mode
|
|
~~~~~~~~~
|
|
!!! error TS1212: Identifier expected. 'protected' is a reserved word in strict mode
|
|
let b: interface.package.implements.B;
|
|
~
|
|
!!! error TS2300: Duplicate identifier 'b'.
|
|
~~~~~~~~~
|
|
!!! error TS1212: Identifier expected. 'interface' is a reserved word in strict mode
|
|
~~~~~~~~~
|
|
!!! error TS2503: Cannot find namespace 'interface'.
|
|
~~~~~~~
|
|
!!! error TS1212: Identifier expected. 'package' is a reserved word in strict mode
|
|
~~~~~~~~~~
|
|
!!! error TS1212: Identifier expected. 'implements' is a reserved word in strict mode
|
|
ublic();
|
|
~~~~~
|
|
!!! error TS2304: Cannot find name 'ublic'.
|
|
static();
|
|
~~~~~~
|
|
!!! error TS1212: Identifier expected. 'static' is a reserved word in strict mode
|
|
~~~~~~~~
|
|
!!! error TS2349: Cannot invoke an expression whose type lacks a call signature.
|
|
}
|
|
|
|
|