TypeScript/tests/baselines/reference/typeOfThisInStaticMembers9(target=es5).types
Wenlu Wang dc237b317e
Change static fields emits (#43114)
* use emit into iife

* Update emit

* Revert un-related changes

* Allow super in static context

* Allow this and super in static property declaration

* Add more tests

* Avoid errors

* Accept baseline

* Accept baseline

* Add decorated classes test

* Add errors

* Avoid this in emitter

* make lint happy

* Add class expression tests

* Add computed name test

* Avoid super if target below es6

* Adjust function boundary

* Add internal

* Fix minor CR issues

* accept baseline

* Update behavior

* Avoid spaces

* Make lint happy

* Avoid function boundary utils

* Update baseline

* Avoid errors

* Accept baseline

* Accept baseline

* Accept baseline

* Accept baseline

* Use substitutions

* Full coverage for super, this, merge static and private context

* Fix use-before-def in static fields

Co-authored-by: Ron Buckton <ron.buckton@microsoft.com>
2021-06-25 15:49:27 -07:00

83 lines
2.1 KiB
Plaintext

=== tests/cases/conformance/classes/members/instanceAndStaticMembers/typeOfThisInStaticMembers9.ts ===
class C {
>C : C
static f = 1
>f : number
>1 : 1
}
class D extends C {
>D : D
>C : C
static arrowFunctionBoundary = () => super.f + 1;
>arrowFunctionBoundary : () => number
>() => super.f + 1 : () => number
>super.f + 1 : number
>super.f : number
>super : typeof C
>f : number
>1 : 1
static functionExprBoundary = function () { return super.f + 2 };
>functionExprBoundary : () => any
>function () { return super.f + 2 } : () => any
>super.f + 2 : any
>super.f : any
>super : any
>f : any
>2 : 2
static classExprBoundary = class { a = super.f + 3 };
>classExprBoundary : typeof (Anonymous class)
>class { a = super.f + 3 } : typeof (Anonymous class)
>a : any
>super.f + 3 : any
>super.f : any
>super : any
>f : any
>3 : 3
static functionAndClassDeclBoundary = (() => {
>functionAndClassDeclBoundary : void
>(() => { function foo () { return super.f + 4 } class C { a = super.f + 5 method () { return super.f +6 } } })() : void
>(() => { function foo () { return super.f + 4 } class C { a = super.f + 5 method () { return super.f +6 } } }) : () => void
>() => { function foo () { return super.f + 4 } class C { a = super.f + 5 method () { return super.f +6 } } } : () => void
function foo () {
>foo : () => any
return super.f + 4
>super.f + 4 : any
>super.f : any
>super : any
>f : any
>4 : 4
}
class C {
>C : C
a = super.f + 5
>a : any
>super.f + 5 : any
>super.f : any
>super : any
>f : any
>5 : 5
method () {
>method : () => any
return super.f +6
>super.f +6 : any
>super.f : any
>super : any
>f : any
>6 : 6
}
}
})();
}