TypeScript/tests/baselines/reference/constructorParametersInVariableDeclarations.errors.txt

37 lines
1.5 KiB
Plaintext
Raw Normal View History

tests/cases/compiler/constructorParametersInVariableDeclarations.ts(2,17): error TS2304: Cannot find name 'x'.
tests/cases/compiler/constructorParametersInVariableDeclarations.ts(3,22): error TS2304: Cannot find name 'x'.
tests/cases/compiler/constructorParametersInVariableDeclarations.ts(4,23): error TS2304: Cannot find name 'x'.
tests/cases/compiler/constructorParametersInVariableDeclarations.ts(10,17): error TS2304: Cannot find name 'x'.
tests/cases/compiler/constructorParametersInVariableDeclarations.ts(11,22): error TS2304: Cannot find name 'x'.
tests/cases/compiler/constructorParametersInVariableDeclarations.ts(12,23): error TS2304: Cannot find name 'x'.
2014-07-13 01:04:16 +02:00
==== tests/cases/compiler/constructorParametersInVariableDeclarations.ts (6 errors) ====
class A {
private a = x;
~
!!! error TS2304: Cannot find name 'x'.
2014-07-13 01:04:16 +02:00
private b = { p: x };
~
!!! error TS2304: Cannot find name 'x'.
2014-07-13 01:04:16 +02:00
private c = () => x;
~
!!! error TS2304: Cannot find name 'x'.
2014-07-13 01:04:16 +02:00
constructor(x: number) {
}
}
class B {
private a = x;
~
!!! error TS2304: Cannot find name 'x'.
2014-07-13 01:04:16 +02:00
private b = { p: x };
~
!!! error TS2304: Cannot find name 'x'.
2014-07-13 01:04:16 +02:00
private c = () => x;
~
!!! error TS2304: Cannot find name 'x'.
2014-07-13 01:04:16 +02:00
constructor() {
var x = 1;
}
}