29 lines
1.2 KiB
Plaintext
29 lines
1.2 KiB
Plaintext
=== 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(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))
|
|
|