mirror of
https://github.com/microsoft/TypeScript.git
synced 2025-11-18 17:21:48 +00:00
fix test
This commit is contained in:
@@ -1,22 +1,17 @@
|
||||
tests/cases/conformance/classes/classDeclarations/classAbstractKeyword/classAbstractAccessor.ts(2,17): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
|
||||
tests/cases/conformance/classes/classDeclarations/classAbstractKeyword/classAbstractAccessor.ts(3,17): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
|
||||
tests/cases/conformance/classes/classDeclarations/classAbstractKeyword/classAbstractAccessor.ts(4,17): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
|
||||
tests/cases/conformance/classes/classDeclarations/classAbstractKeyword/classAbstractAccessor.ts(5,17): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
|
||||
tests/cases/conformance/classes/classDeclarations/classAbstractKeyword/classAbstractAccessor.ts(4,17): error TS1318: An abstract accessor cannot have an implementation.
|
||||
tests/cases/conformance/classes/classDeclarations/classAbstractKeyword/classAbstractAccessor.ts(6,17): error TS1318: An abstract accessor cannot have an implementation.
|
||||
|
||||
|
||||
==== tests/cases/conformance/classes/classDeclarations/classAbstractKeyword/classAbstractAccessor.ts (4 errors) ====
|
||||
==== tests/cases/conformance/classes/classDeclarations/classAbstractKeyword/classAbstractAccessor.ts (2 errors) ====
|
||||
|
||||
abstract class A {
|
||||
abstract get a();
|
||||
~
|
||||
!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
|
||||
abstract get aa() { return 1; } // error
|
||||
~~
|
||||
!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
|
||||
!!! error TS1318: An abstract accessor cannot have an implementation.
|
||||
abstract set b(x: string);
|
||||
~
|
||||
!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
|
||||
abstract set bb(x: string) {} // error
|
||||
~~
|
||||
!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
|
||||
!!! error TS1318: An abstract accessor cannot have an implementation.
|
||||
}
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
//// [classAbstractAccessor.ts]
|
||||
|
||||
abstract class A {
|
||||
abstract get a();
|
||||
abstract get aa() { return 1; } // error
|
||||
|
||||
+2
@@ -1,3 +1,5 @@
|
||||
// @target: es5
|
||||
|
||||
abstract class A {
|
||||
abstract get a();
|
||||
abstract get aa() { return 1; } // error
|
||||
|
||||
Reference in New Issue
Block a user