File: optionalConstructorArgInSuper.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 (28 lines) | stat: -rw-r--r-- 1,183 bytes parent folder | download | duplicates (7)
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
=== tests/cases/compiler/optionalConstructorArgInSuper.ts ===
class Base {
>Base : Symbol(Base, Decl(optionalConstructorArgInSuper.ts, 0, 0))

    constructor(opt?) { }
>opt : Symbol(opt, Decl(optionalConstructorArgInSuper.ts, 1, 16))

    foo(other?) { }
>foo : Symbol(Base.foo, Decl(optionalConstructorArgInSuper.ts, 1, 25))
>other : Symbol(other, Decl(optionalConstructorArgInSuper.ts, 2, 8))
}
class Derived extends Base {
>Derived : Symbol(Derived, Decl(optionalConstructorArgInSuper.ts, 3, 1))
>Base : Symbol(Base, Decl(optionalConstructorArgInSuper.ts, 0, 0))
}
var d = new Derived(); // bug caused an error here, couldn't select overload
>d : Symbol(d, Decl(optionalConstructorArgInSuper.ts, 6, 3))
>Derived : Symbol(Derived, Decl(optionalConstructorArgInSuper.ts, 3, 1))

var d2: Derived;
>d2 : Symbol(d2, Decl(optionalConstructorArgInSuper.ts, 7, 3))
>Derived : Symbol(Derived, Decl(optionalConstructorArgInSuper.ts, 3, 1))

d2.foo(); 
>d2.foo : Symbol(Base.foo, Decl(optionalConstructorArgInSuper.ts, 1, 25))
>d2 : Symbol(d2, Decl(optionalConstructorArgInSuper.ts, 7, 3))
>foo : Symbol(Base.foo, Decl(optionalConstructorArgInSuper.ts, 1, 25))