File: classExtendsEveryObjectType.symbols

package info (click to toggle)
node-typescript 4.9.5%2Bds1-2
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 533,908 kB
  • sloc: javascript: 2,018,330; makefile: 7; sh: 1
file content (41 lines) | stat: -rw-r--r-- 1,592 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
=== tests/cases/conformance/classes/classDeclarations/classHeritageSpecification/classExtendsEveryObjectType.ts ===
interface I {
>I : Symbol(I, Decl(classExtendsEveryObjectType.ts, 0, 0))

    foo: string;
>foo : Symbol(I.foo, Decl(classExtendsEveryObjectType.ts, 0, 13))
}
class C extends I { } // error
>C : Symbol(C, Decl(classExtendsEveryObjectType.ts, 2, 1))
>I : Symbol(I, Decl(classExtendsEveryObjectType.ts, 0, 0))

class C2 extends { foo: string; } { } // error
>C2 : Symbol(C2, Decl(classExtendsEveryObjectType.ts, 3, 21))
>foo : Symbol(foo, Decl(classExtendsEveryObjectType.ts, 5, 18))

var x: { foo: string; }
>x : Symbol(x, Decl(classExtendsEveryObjectType.ts, 6, 3))
>foo : Symbol(foo, Decl(classExtendsEveryObjectType.ts, 6, 8))

class C3 extends x { } // error
>C3 : Symbol(C3, Decl(classExtendsEveryObjectType.ts, 6, 23))
>x : Symbol(x, Decl(classExtendsEveryObjectType.ts, 6, 3))

module M { export var x = 1; }
>M : Symbol(M, Decl(classExtendsEveryObjectType.ts, 7, 22))
>x : Symbol(x, Decl(classExtendsEveryObjectType.ts, 9, 21))

class C4 extends M { } // error
>C4 : Symbol(C4, Decl(classExtendsEveryObjectType.ts, 9, 30))
>M : Symbol(M, Decl(classExtendsEveryObjectType.ts, 7, 22))

function foo() { }
>foo : Symbol(foo, Decl(classExtendsEveryObjectType.ts, 10, 22))

class C5 extends foo { } // error
>C5 : Symbol(C5, Decl(classExtendsEveryObjectType.ts, 12, 18))
>foo : Symbol(foo, Decl(classExtendsEveryObjectType.ts, 10, 22))

class C6 extends []{ } // error
>C6 : Symbol(C6, Decl(classExtendsEveryObjectType.ts, 13, 24))