File: objectTypesWithOptionalProperties2.symbols

package info (click to toggle)
node-typescript 3.3.3333-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 324,548 kB
  • sloc: makefile: 6; sh: 3
file content (53 lines) | stat: -rw-r--r-- 2,051 bytes parent folder | download | duplicates (5)
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
42
43
44
45
46
47
48
49
50
51
52
53
=== tests/cases/conformance/types/objectTypeLiteral/methodSignatures/objectTypesWithOptionalProperties2.ts ===
// Illegal attempts to define optional methods

var a: {
>a : Symbol(a, Decl(objectTypesWithOptionalProperties2.ts, 2, 3))

    x()?: number; // error
>x : Symbol(x, Decl(objectTypesWithOptionalProperties2.ts, 2, 8))
>number : Symbol(number, Decl(objectTypesWithOptionalProperties2.ts, 3, 9))
}

interface I {
>I : Symbol(I, Decl(objectTypesWithOptionalProperties2.ts, 4, 1))

    x()?: number; // error
>x : Symbol(I.x, Decl(objectTypesWithOptionalProperties2.ts, 6, 13))
>number : Symbol(I.number, Decl(objectTypesWithOptionalProperties2.ts, 7, 9))
}

class C {
>C : Symbol(C, Decl(objectTypesWithOptionalProperties2.ts, 8, 1))

    x()?: number; // error
>x : Symbol(C.x, Decl(objectTypesWithOptionalProperties2.ts, 10, 9))
>number : Symbol(C.number, Decl(objectTypesWithOptionalProperties2.ts, 11, 9))
}

interface I2<T> {
>I2 : Symbol(I2, Decl(objectTypesWithOptionalProperties2.ts, 12, 1))
>T : Symbol(T, Decl(objectTypesWithOptionalProperties2.ts, 14, 13), Decl(objectTypesWithOptionalProperties2.ts, 15, 9))

    x()?: T; // error
>x : Symbol(I2.x, Decl(objectTypesWithOptionalProperties2.ts, 14, 17))
>T : Symbol(T, Decl(objectTypesWithOptionalProperties2.ts, 14, 13), Decl(objectTypesWithOptionalProperties2.ts, 15, 9))
}

class C2<T> {
>C2 : Symbol(C2, Decl(objectTypesWithOptionalProperties2.ts, 16, 1))
>T : Symbol(T, Decl(objectTypesWithOptionalProperties2.ts, 18, 9), Decl(objectTypesWithOptionalProperties2.ts, 19, 9))

    x()?: T; // error
>x : Symbol(C2.x, Decl(objectTypesWithOptionalProperties2.ts, 18, 13))
>T : Symbol(T, Decl(objectTypesWithOptionalProperties2.ts, 18, 9), Decl(objectTypesWithOptionalProperties2.ts, 19, 9))
}


var b = {
>b : Symbol(b, Decl(objectTypesWithOptionalProperties2.ts, 23, 3))

    x()?: 1 // error
>x : Symbol(x, Decl(objectTypesWithOptionalProperties2.ts, 23, 9))
>1 : Symbol(1, Decl(objectTypesWithOptionalProperties2.ts, 24, 9))
}