* Fix 'arguments' check in class field initializer or static initialization block * return errorType * Merge branch 'master' of https://github.com/exoticknight/TypeScript * use isInPropertyInitializer fix Diagnostics message
73 lines
1.3 KiB
Plaintext
73 lines
1.3 KiB
Plaintext
=== tests/cases/compiler/argumentsUsedInClassFieldInitializerOrStaticInitializationBlock.ts ===
|
|
function A() {
|
|
>A : () => typeof T
|
|
|
|
return class T {
|
|
>class T { a = arguments } : typeof T
|
|
>T : typeof T
|
|
|
|
a = arguments
|
|
>a : any
|
|
>arguments : any
|
|
}
|
|
}
|
|
|
|
function A1() {
|
|
>A1 : () => T
|
|
|
|
return new class T {
|
|
>new class T { a = arguments } : T
|
|
>class T { a = arguments } : typeof T
|
|
>T : typeof T
|
|
|
|
a = arguments
|
|
>a : any
|
|
>arguments : any
|
|
}
|
|
}
|
|
|
|
function B() {
|
|
>B : () => typeof T
|
|
|
|
return class T {
|
|
>class T { a = { b: arguments } } : typeof T
|
|
>T : typeof T
|
|
|
|
a = { b: arguments }
|
|
>a : { b: any; }
|
|
>{ b: arguments } : { b: any; }
|
|
>b : any
|
|
>arguments : any
|
|
}
|
|
}
|
|
|
|
function B1() {
|
|
>B1 : () => T
|
|
|
|
return new class T {
|
|
>new class T { a = { b: arguments } } : T
|
|
>class T { a = { b: arguments } } : typeof T
|
|
>T : typeof T
|
|
|
|
a = { b: arguments }
|
|
>a : { b: any; }
|
|
>{ b: arguments } : { b: any; }
|
|
>b : any
|
|
>arguments : any
|
|
}
|
|
}
|
|
|
|
function C() {
|
|
>C : () => typeof T
|
|
|
|
return class T {
|
|
>class T { a = function () { arguments } } : typeof T
|
|
>T : typeof T
|
|
|
|
a = function () { arguments }
|
|
>a : () => void
|
|
>function () { arguments } : () => void
|
|
>arguments : IArguments
|
|
}
|
|
}
|