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

40 lines
2.4 KiB
Plaintext
Raw Normal View History

tests/cases/conformance/classes/classDeclarations/classHeritageSpecification/classExtendsEveryObjectType.ts(4,17): error TS2311: A class may only extend another class.
2015-04-01 02:23:52 +02:00
tests/cases/conformance/classes/classDeclarations/classHeritageSpecification/classExtendsEveryObjectType.ts(6,18): error TS9002: Only identifiers/qualified-names with optional type arguments are currently supported in a class 'extends' clauses.
tests/cases/conformance/classes/classDeclarations/classHeritageSpecification/classExtendsEveryObjectType.ts(6,31): error TS1005: ',' expected.
tests/cases/conformance/classes/classDeclarations/classHeritageSpecification/classExtendsEveryObjectType.ts(8,18): error TS2304: Cannot find name 'x'.
tests/cases/conformance/classes/classDeclarations/classHeritageSpecification/classExtendsEveryObjectType.ts(11,18): error TS2304: Cannot find name 'M'.
tests/cases/conformance/classes/classDeclarations/classHeritageSpecification/classExtendsEveryObjectType.ts(14,18): error TS2304: Cannot find name 'foo'.
2015-04-01 02:23:52 +02:00
tests/cases/conformance/classes/classDeclarations/classHeritageSpecification/classExtendsEveryObjectType.ts(16,18): error TS9002: Only identifiers/qualified-names with optional type arguments are currently supported in a class 'extends' clauses.
==== tests/cases/conformance/classes/classDeclarations/classHeritageSpecification/classExtendsEveryObjectType.ts (7 errors) ====
2014-07-13 01:04:16 +02:00
interface I {
foo: string;
}
class C extends I { } // error
~
!!! error TS2311: A class may only extend another class.
2014-07-13 01:04:16 +02:00
class C2 extends { foo: string; } { } // error
~~~~~~~~~~~~~~~~
2015-04-01 02:23:52 +02:00
!!! error TS9002: Only identifiers/qualified-names with optional type arguments are currently supported in a class 'extends' clauses.
~
!!! error TS1005: ',' expected.
2014-07-13 01:04:16 +02:00
var x: { foo: string; }
class C3 extends x { } // error
~
!!! error TS2304: Cannot find name 'x'.
2014-07-13 01:04:16 +02:00
module M { export var x = 1; }
class C4 extends M { } // error
~
!!! error TS2304: Cannot find name 'M'.
2014-07-13 01:04:16 +02:00
function foo() { }
class C5 extends foo { } // error
~~~
!!! error TS2304: Cannot find name 'foo'.
2014-07-13 01:04:16 +02:00
class C6 extends []{ } // error
~~
2015-04-01 02:23:52 +02:00
!!! error TS9002: Only identifiers/qualified-names with optional type arguments are currently supported in a class 'extends' clauses.