TypeScript/tests/baselines/reference/superInLambdas.types
Wesley Wigham 5353475fce Always collect type and symbol baselines (#18621)
* 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
2017-09-22 15:52:04 -07:00

178 lines
4 KiB
Plaintext

=== tests/cases/compiler/superInLambdas.ts ===
class User {
>User : User
name: string = "Bob";
>name : string
>"Bob" : "Bob"
sayHello(): void {
>sayHello : () => void
//console.log("Hello, " + this.name);
}
}
class RegisteredUser extends User {
>RegisteredUser : RegisteredUser
>User : User
name: string = "Frank";
>name : string
>"Frank" : "Frank"
constructor() {
super();
>super() : void
>super : typeof User
// super call in a constructor
super.sayHello();
>super.sayHello() : void
>super.sayHello : () => void
>super : User
>sayHello : () => void
// super call in a lambda in a constructor
var x = () => super.sayHello();
>x : () => void
>() => super.sayHello() : () => void
>super.sayHello() : void
>super.sayHello : () => void
>super : User
>sayHello : () => void
}
sayHello(): void {
>sayHello : () => void
// super call in a method
super.sayHello();
>super.sayHello() : void
>super.sayHello : () => void
>super : User
>sayHello : () => void
// super call in a lambda in a method
var x = () => super.sayHello();
>x : () => void
>() => super.sayHello() : () => void
>super.sayHello() : void
>super.sayHello : () => void
>super : User
>sayHello : () => void
}
}
class RegisteredUser2 extends User {
>RegisteredUser2 : RegisteredUser2
>User : User
name: string = "Joe";
>name : string
>"Joe" : "Joe"
constructor() {
super();
>super() : void
>super : typeof User
// super call in a nested lambda in a constructor
var x = () => () => () => super.sayHello();
>x : () => () => () => void
>() => () => () => super.sayHello() : () => () => () => void
>() => () => super.sayHello() : () => () => void
>() => super.sayHello() : () => void
>super.sayHello() : void
>super.sayHello : () => void
>super : User
>sayHello : () => void
}
sayHello(): void {
>sayHello : () => void
// super call in a nested lambda in a method
var x = () => () => () => super.sayHello();
>x : () => () => () => void
>() => () => () => super.sayHello() : () => () => () => void
>() => () => super.sayHello() : () => () => void
>() => super.sayHello() : () => void
>super.sayHello() : void
>super.sayHello : () => void
>super : User
>sayHello : () => void
}
}
class RegisteredUser3 extends User {
>RegisteredUser3 : RegisteredUser3
>User : User
name: string = "Sam";
>name : string
>"Sam" : "Sam"
constructor() {
super();
>super() : void
>super : typeof User
// super property in a nested lambda in a constructor
var superName = () => () => () => super.name;
>superName : () => () => () => string
>() => () => () => super.name : () => () => () => string
>() => () => super.name : () => () => string
>() => super.name : () => string
>super.name : string
>super : User
>name : string
}
sayHello(): void {
>sayHello : () => void
// super property in a nested lambda in a method
var superName = () => () => () => super.name;
>superName : () => () => () => string
>() => () => () => super.name : () => () => () => string
>() => () => super.name : () => () => string
>() => super.name : () => string
>super.name : string
>super : User
>name : string
}
}
class RegisteredUser4 extends User {
>RegisteredUser4 : RegisteredUser4
>User : User
name: string = "Mark";
>name : string
>"Mark" : "Mark"
constructor() {
super();
>super() : void
>super : typeof User
// super in a nested lambda in a constructor
var x = () => () => super;
>x : () => () => any
>() => () => super : () => () => any
>() => super : () => any
>super : any
>super : User
> : any
}
sayHello(): void {
>sayHello : () => void
// super in a nested lambda in a method
var x = () => () => super;
>x : () => () => any
>() => () => super : () => () => any
>() => super : () => any
>super : any
>super : User
> : any
}
}