150 lines
No EOL
12 KiB
Text
150 lines
No EOL
12 KiB
Text
tests/cases/compiler/collisionArgumentsClassMethod.ts(2,27): error TS2396: Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters.
|
|
tests/cases/compiler/collisionArgumentsClassMethod.ts(2,30): error TS1210: Invalid use of 'arguments'. Class definitions are automatically in strict mode.
|
|
tests/cases/compiler/collisionArgumentsClassMethod.ts(3,13): error TS1210: Invalid use of 'arguments'. Class definitions are automatically in strict mode.
|
|
tests/cases/compiler/collisionArgumentsClassMethod.ts(5,17): error TS1210: Invalid use of 'arguments'. Class definitions are automatically in strict mode.
|
|
tests/cases/compiler/collisionArgumentsClassMethod.ts(5,17): error TS2396: Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters.
|
|
tests/cases/compiler/collisionArgumentsClassMethod.ts(6,13): error TS1210: Invalid use of 'arguments'. Class definitions are automatically in strict mode.
|
|
tests/cases/compiler/collisionArgumentsClassMethod.ts(8,23): error TS1210: Invalid use of 'arguments'. Class definitions are automatically in strict mode.
|
|
tests/cases/compiler/collisionArgumentsClassMethod.ts(9,13): error TS1210: Invalid use of 'arguments'. Class definitions are automatically in strict mode.
|
|
tests/cases/compiler/collisionArgumentsClassMethod.ts(11,29): error TS1210: Invalid use of 'arguments'. Class definitions are automatically in strict mode.
|
|
tests/cases/compiler/collisionArgumentsClassMethod.ts(12,29): error TS1210: Invalid use of 'arguments'. Class definitions are automatically in strict mode.
|
|
tests/cases/compiler/collisionArgumentsClassMethod.ts(13,23): error TS2396: Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters.
|
|
tests/cases/compiler/collisionArgumentsClassMethod.ts(13,26): error TS1210: Invalid use of 'arguments'. Class definitions are automatically in strict mode.
|
|
tests/cases/compiler/collisionArgumentsClassMethod.ts(14,13): error TS1210: Invalid use of 'arguments'. Class definitions are automatically in strict mode.
|
|
tests/cases/compiler/collisionArgumentsClassMethod.ts(16,16): error TS1210: Invalid use of 'arguments'. Class definitions are automatically in strict mode.
|
|
tests/cases/compiler/collisionArgumentsClassMethod.ts(17,16): error TS1210: Invalid use of 'arguments'. Class definitions are automatically in strict mode.
|
|
tests/cases/compiler/collisionArgumentsClassMethod.ts(18,16): error TS1210: Invalid use of 'arguments'. Class definitions are automatically in strict mode.
|
|
tests/cases/compiler/collisionArgumentsClassMethod.ts(18,16): error TS2396: Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters.
|
|
tests/cases/compiler/collisionArgumentsClassMethod.ts(19,13): error TS1210: Invalid use of 'arguments'. Class definitions are automatically in strict mode.
|
|
tests/cases/compiler/collisionArgumentsClassMethod.ts(21,22): error TS1210: Invalid use of 'arguments'. Class definitions are automatically in strict mode.
|
|
tests/cases/compiler/collisionArgumentsClassMethod.ts(22,22): error TS1210: Invalid use of 'arguments'. Class definitions are automatically in strict mode.
|
|
tests/cases/compiler/collisionArgumentsClassMethod.ts(23,22): error TS1210: Invalid use of 'arguments'. Class definitions are automatically in strict mode.
|
|
tests/cases/compiler/collisionArgumentsClassMethod.ts(24,13): error TS1210: Invalid use of 'arguments'. Class definitions are automatically in strict mode.
|
|
tests/cases/compiler/collisionArgumentsClassMethod.ts(29,30): error TS1210: Invalid use of 'arguments'. Class definitions are automatically in strict mode.
|
|
tests/cases/compiler/collisionArgumentsClassMethod.ts(30,17): error TS1210: Invalid use of 'arguments'. Class definitions are automatically in strict mode.
|
|
tests/cases/compiler/collisionArgumentsClassMethod.ts(31,23): error TS1210: Invalid use of 'arguments'. Class definitions are automatically in strict mode.
|
|
tests/cases/compiler/collisionArgumentsClassMethod.ts(33,29): error TS1210: Invalid use of 'arguments'. Class definitions are automatically in strict mode.
|
|
tests/cases/compiler/collisionArgumentsClassMethod.ts(34,29): error TS1210: Invalid use of 'arguments'. Class definitions are automatically in strict mode.
|
|
tests/cases/compiler/collisionArgumentsClassMethod.ts(35,16): error TS1210: Invalid use of 'arguments'. Class definitions are automatically in strict mode.
|
|
tests/cases/compiler/collisionArgumentsClassMethod.ts(36,16): error TS1210: Invalid use of 'arguments'. Class definitions are automatically in strict mode.
|
|
tests/cases/compiler/collisionArgumentsClassMethod.ts(37,22): error TS1210: Invalid use of 'arguments'. Class definitions are automatically in strict mode.
|
|
tests/cases/compiler/collisionArgumentsClassMethod.ts(38,22): error TS1210: Invalid use of 'arguments'. Class definitions are automatically in strict mode.
|
|
tests/cases/compiler/collisionArgumentsClassMethod.ts(43,13): error TS1210: Invalid use of 'arguments'. Class definitions are automatically in strict mode.
|
|
tests/cases/compiler/collisionArgumentsClassMethod.ts(46,13): error TS1210: Invalid use of 'arguments'. Class definitions are automatically in strict mode.
|
|
|
|
|
|
==== tests/cases/compiler/collisionArgumentsClassMethod.ts (33 errors) ====
|
|
class c1 {
|
|
public foo(i: number, ...arguments) { //arguments is error
|
|
~~~~~~~~~~~~
|
|
!!! error TS2396: Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters.
|
|
~~~~~~~~~
|
|
!!! error TS1210: Invalid use of 'arguments'. Class definitions are automatically in strict mode.
|
|
var arguments: any[]; // no error
|
|
~~~~~~~~~
|
|
!!! error TS1210: Invalid use of 'arguments'. Class definitions are automatically in strict mode.
|
|
}
|
|
public foo1(arguments: number, ...rest) { //arguments is error
|
|
~~~~~~~~~
|
|
!!! error TS1210: Invalid use of 'arguments'. Class definitions are automatically in strict mode.
|
|
~~~~~~~~~~~~~~~~~
|
|
!!! error TS2396: Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters.
|
|
var arguments = 10; // no error
|
|
~~~~~~~~~
|
|
!!! error TS1210: Invalid use of 'arguments'. Class definitions are automatically in strict mode.
|
|
}
|
|
public fooNoError(arguments: number) { // no error
|
|
~~~~~~~~~
|
|
!!! error TS1210: Invalid use of 'arguments'. Class definitions are automatically in strict mode.
|
|
var arguments = 10; // no error
|
|
~~~~~~~~~
|
|
!!! error TS1210: Invalid use of 'arguments'. Class definitions are automatically in strict mode.
|
|
}
|
|
public f4(i: number, ...arguments); // no codegen no error
|
|
~~~~~~~~~
|
|
!!! error TS1210: Invalid use of 'arguments'. Class definitions are automatically in strict mode.
|
|
public f4(i: string, ...arguments); // no codegen no error
|
|
~~~~~~~~~
|
|
!!! error TS1210: Invalid use of 'arguments'. Class definitions are automatically in strict mode.
|
|
public f4(i: any, ...arguments) { // error
|
|
~~~~~~~~~~~~
|
|
!!! error TS2396: Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters.
|
|
~~~~~~~~~
|
|
!!! error TS1210: Invalid use of 'arguments'. Class definitions are automatically in strict mode.
|
|
var arguments: any[]; // no error
|
|
~~~~~~~~~
|
|
!!! error TS1210: Invalid use of 'arguments'. Class definitions are automatically in strict mode.
|
|
}
|
|
public f41(arguments: number, ...rest); // no codegen no error
|
|
~~~~~~~~~
|
|
!!! error TS1210: Invalid use of 'arguments'. Class definitions are automatically in strict mode.
|
|
public f41(arguments: string, ...rest); // no codegen no error
|
|
~~~~~~~~~
|
|
!!! error TS1210: Invalid use of 'arguments'. Class definitions are automatically in strict mode.
|
|
public f41(arguments: any, ...rest) { // error
|
|
~~~~~~~~~
|
|
!!! error TS1210: Invalid use of 'arguments'. Class definitions are automatically in strict mode.
|
|
~~~~~~~~~~~~~~
|
|
!!! error TS2396: Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters.
|
|
var arguments: any; // no error
|
|
~~~~~~~~~
|
|
!!! error TS1210: Invalid use of 'arguments'. Class definitions are automatically in strict mode.
|
|
}
|
|
public f4NoError(arguments: number); // no error
|
|
~~~~~~~~~
|
|
!!! error TS1210: Invalid use of 'arguments'. Class definitions are automatically in strict mode.
|
|
public f4NoError(arguments: string); // no error
|
|
~~~~~~~~~
|
|
!!! error TS1210: Invalid use of 'arguments'. Class definitions are automatically in strict mode.
|
|
public f4NoError(arguments: any) { // no error
|
|
~~~~~~~~~
|
|
!!! error TS1210: Invalid use of 'arguments'. Class definitions are automatically in strict mode.
|
|
var arguments: any; // no error
|
|
~~~~~~~~~
|
|
!!! error TS1210: Invalid use of 'arguments'. Class definitions are automatically in strict mode.
|
|
}
|
|
}
|
|
|
|
declare class c2 {
|
|
public foo(i: number, ...arguments); // No error - no code gen
|
|
~~~~~~~~~
|
|
!!! error TS1210: Invalid use of 'arguments'. Class definitions are automatically in strict mode.
|
|
public foo1(arguments: number, ...rest); // No error - no code gen
|
|
~~~~~~~~~
|
|
!!! error TS1210: Invalid use of 'arguments'. Class definitions are automatically in strict mode.
|
|
public fooNoError(arguments: number); // No error - no code gen
|
|
~~~~~~~~~
|
|
!!! error TS1210: Invalid use of 'arguments'. Class definitions are automatically in strict mode.
|
|
|
|
public f4(i: number, ...arguments); // no codegen no error
|
|
~~~~~~~~~
|
|
!!! error TS1210: Invalid use of 'arguments'. Class definitions are automatically in strict mode.
|
|
public f4(i: string, ...arguments); // no codegen no error
|
|
~~~~~~~~~
|
|
!!! error TS1210: Invalid use of 'arguments'. Class definitions are automatically in strict mode.
|
|
public f41(arguments: number, ...rest); // no codegen no error
|
|
~~~~~~~~~
|
|
!!! error TS1210: Invalid use of 'arguments'. Class definitions are automatically in strict mode.
|
|
public f41(arguments: string, ...rest); // no codegen no error
|
|
~~~~~~~~~
|
|
!!! error TS1210: Invalid use of 'arguments'. Class definitions are automatically in strict mode.
|
|
public f4NoError(arguments: number); // no error
|
|
~~~~~~~~~
|
|
!!! error TS1210: Invalid use of 'arguments'. Class definitions are automatically in strict mode.
|
|
public f4NoError(arguments: string); // no error
|
|
~~~~~~~~~
|
|
!!! error TS1210: Invalid use of 'arguments'. Class definitions are automatically in strict mode.
|
|
}
|
|
|
|
class c3 {
|
|
public foo(...restParameters) {
|
|
var arguments = 10; // no error
|
|
~~~~~~~~~
|
|
!!! error TS1210: Invalid use of 'arguments'. Class definitions are automatically in strict mode.
|
|
}
|
|
public fooNoError() {
|
|
var arguments = 10; // no error
|
|
~~~~~~~~~
|
|
!!! error TS1210: Invalid use of 'arguments'. Class definitions are automatically in strict mode.
|
|
}
|
|
} |