TypeScript/tests/baselines/reference/constructorParametersInVariableDeclarations.errors.txt
2014-09-12 13:35:07 -07:00

37 lines
1.5 KiB
Plaintext

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'.
==== tests/cases/compiler/constructorParametersInVariableDeclarations.ts (6 errors) ====
class A {
private a = x;
~
!!! error TS2304: Cannot find name 'x'.
private b = { p: x };
~
!!! error TS2304: Cannot find name 'x'.
private c = () => x;
~
!!! error TS2304: Cannot find name 'x'.
constructor(x: number) {
}
}
class B {
private a = x;
~
!!! error TS2304: Cannot find name 'x'.
private b = { p: x };
~
!!! error TS2304: Cannot find name 'x'.
private c = () => x;
~
!!! error TS2304: Cannot find name 'x'.
constructor() {
var x = 1;
}
}