2014-09-12 22:35:07 +02:00
|
|
|
tests/cases/compiler/accessorsInAmbientContext.ts(4,13): error TS1086: An accessor cannot be declared in an ambient context.
|
|
|
|
tests/cases/compiler/accessorsInAmbientContext.ts(5,13): error TS1086: An accessor cannot be declared in an ambient context.
|
|
|
|
tests/cases/compiler/accessorsInAmbientContext.ts(7,20): error TS1086: An accessor cannot be declared in an ambient context.
|
|
|
|
tests/cases/compiler/accessorsInAmbientContext.ts(8,20): error TS1086: An accessor cannot be declared in an ambient context.
|
|
|
|
tests/cases/compiler/accessorsInAmbientContext.ts(13,9): error TS1086: An accessor cannot be declared in an ambient context.
|
|
|
|
tests/cases/compiler/accessorsInAmbientContext.ts(14,9): error TS1086: An accessor cannot be declared in an ambient context.
|
|
|
|
tests/cases/compiler/accessorsInAmbientContext.ts(16,16): error TS1086: An accessor cannot be declared in an ambient context.
|
|
|
|
tests/cases/compiler/accessorsInAmbientContext.ts(17,16): error TS1086: An accessor cannot be declared in an ambient context.
|
|
|
|
|
|
|
|
|
2014-07-13 01:04:16 +02:00
|
|
|
==== tests/cases/compiler/accessorsInAmbientContext.ts (8 errors) ====
|
|
|
|
|
|
|
|
declare module M {
|
|
|
|
class C {
|
|
|
|
get X() { return 1; }
|
|
|
|
~
|
2014-09-12 00:19:57 +02:00
|
|
|
!!! error TS1086: An accessor cannot be declared in an ambient context.
|
2014-07-13 01:04:16 +02:00
|
|
|
set X(v) { }
|
|
|
|
~
|
2014-09-12 00:19:57 +02:00
|
|
|
!!! error TS1086: An accessor cannot be declared in an ambient context.
|
2014-07-13 01:04:16 +02:00
|
|
|
|
|
|
|
static get Y() { return 1; }
|
|
|
|
~
|
2014-09-12 00:19:57 +02:00
|
|
|
!!! error TS1086: An accessor cannot be declared in an ambient context.
|
2014-07-13 01:04:16 +02:00
|
|
|
static set Y(v) { }
|
|
|
|
~
|
2014-09-12 00:19:57 +02:00
|
|
|
!!! error TS1086: An accessor cannot be declared in an ambient context.
|
2014-07-13 01:04:16 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
declare class C {
|
|
|
|
get X() { return 1; }
|
|
|
|
~
|
2014-09-12 00:19:57 +02:00
|
|
|
!!! error TS1086: An accessor cannot be declared in an ambient context.
|
2014-07-13 01:04:16 +02:00
|
|
|
set X(v) { }
|
|
|
|
~
|
2014-09-12 00:19:57 +02:00
|
|
|
!!! error TS1086: An accessor cannot be declared in an ambient context.
|
2014-07-13 01:04:16 +02:00
|
|
|
|
|
|
|
static get Y() { return 1; }
|
|
|
|
~
|
2014-09-12 00:19:57 +02:00
|
|
|
!!! error TS1086: An accessor cannot be declared in an ambient context.
|
2014-07-13 01:04:16 +02:00
|
|
|
static set Y(v) { }
|
|
|
|
~
|
2014-09-12 00:19:57 +02:00
|
|
|
!!! error TS1086: An accessor cannot be declared in an ambient context.
|
2014-07-13 01:04:16 +02:00
|
|
|
}
|