* Always generate type & symbol baselines * Accept changed shadowed baselines * Accept brand new type and symbol baselines * Allow `getTypeAtLocation` to return undefined in the type writer * Accept baselines which had missing type information * Bind container for dynamically names enum members so they may be printed * Accept type/symbol baselines for enums with computed members * First pass at reducing typeWriter memory overhead * Use generators to allow for type and symbol baselines with no cache * Accept new baselines for tests whose output was fixed by better newline splitting * Hard cap on number of declarations printed, cache declaration print text * handle differing newlines better still to handle RWC newlines * Lower abridging count, accept abridged baselines * Limit max RWC error output size, limit RWC type and symbol baseline input size * Move skip logic into type and symbol baseliner to streamline error handling * Accept removal of empty baselines * Canonicalize path earlier to handle odd paths in input files * Do canonicalization earlier still, also ensure parallel perf profiles for different targets do not trample one another * No need to pathify again
157 lines
2.5 KiB
Plaintext
157 lines
2.5 KiB
Plaintext
=== tests/cases/conformance/expressions/superCalls/errorSuperCalls.ts ===
|
|
//super call in class constructor with no base type
|
|
class NoBase {
|
|
>NoBase : NoBase
|
|
|
|
constructor() {
|
|
super();
|
|
>super() : void
|
|
>super : any
|
|
}
|
|
|
|
//super call in class member function with no base type
|
|
fn() {
|
|
>fn : () => void
|
|
|
|
super();
|
|
>super() : void
|
|
>super : any
|
|
}
|
|
|
|
//super call in class accessor (get and set) with no base type
|
|
get foo() {
|
|
>foo : any
|
|
|
|
super();
|
|
>super() : void
|
|
>super : any
|
|
|
|
return null;
|
|
>null : null
|
|
}
|
|
set foo(v) {
|
|
>foo : any
|
|
>v : any
|
|
|
|
super();
|
|
>super() : void
|
|
>super : any
|
|
}
|
|
|
|
//super call in class member initializer with no base type
|
|
p = super();
|
|
>p : void
|
|
>super() : void
|
|
>super : any
|
|
|
|
//super call in static class member function with no base type
|
|
static fn() {
|
|
>fn : () => void
|
|
|
|
super();
|
|
>super() : void
|
|
>super : any
|
|
}
|
|
|
|
//super call in static class member initializer with no base type
|
|
static k = super();
|
|
>k : void
|
|
>super() : void
|
|
>super : any
|
|
|
|
//super call in static class accessor (get and set) with no base type
|
|
static get q() {
|
|
>q : any
|
|
|
|
super();
|
|
>super() : void
|
|
>super : any
|
|
|
|
return null;
|
|
>null : null
|
|
}
|
|
static set q(n) {
|
|
>q : any
|
|
>n : any
|
|
|
|
super();
|
|
>super() : void
|
|
>super : any
|
|
}
|
|
}
|
|
|
|
class Base<T> { private n: T; }
|
|
>Base : Base<T>
|
|
>T : T
|
|
>n : T
|
|
>T : T
|
|
|
|
class Derived<T> extends Base<T> {
|
|
>Derived : Derived<T>
|
|
>T : T
|
|
>Base : Base<T>
|
|
>T : T
|
|
|
|
//super call with type arguments
|
|
constructor() {
|
|
super<string>();
|
|
>super<string>() : any
|
|
>super : any
|
|
>super : Base<T>
|
|
> : any
|
|
|
|
super();
|
|
>super() : void
|
|
>super : typeof Base
|
|
}
|
|
}
|
|
|
|
|
|
class OtherBase {
|
|
>OtherBase : OtherBase
|
|
|
|
private n: string;
|
|
>n : string
|
|
}
|
|
|
|
class OtherDerived extends OtherBase {
|
|
>OtherDerived : OtherDerived
|
|
>OtherBase : OtherBase
|
|
|
|
//super call in class member initializer of derived type
|
|
t = super();
|
|
>t : void
|
|
>super() : void
|
|
>super : any
|
|
|
|
fn() {
|
|
>fn : () => void
|
|
|
|
//super call in class member function of derived type
|
|
super();
|
|
>super() : void
|
|
>super : any
|
|
}
|
|
|
|
//super call in class accessor (get and set) of derived type
|
|
get foo() {
|
|
>foo : any
|
|
|
|
super();
|
|
>super() : void
|
|
>super : any
|
|
|
|
return null;
|
|
>null : null
|
|
}
|
|
set foo(n) {
|
|
>foo : any
|
|
>n : any
|
|
|
|
super();
|
|
>super() : void
|
|
>super : any
|
|
}
|
|
}
|
|
|