mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-05 08:11:30 -06:00
Initial exploration and test case creation
Co-authored-by: RyanCavanaugh <6685088+RyanCavanaugh@users.noreply.github.com>
This commit is contained in:
parent
58449bba93
commit
6355df5d95
17
tests/cases/compiler/thisTypeComparison.ts
Normal file
17
tests/cases/compiler/thisTypeComparison.ts
Normal file
@ -0,0 +1,17 @@
|
||||
// @strict: true
|
||||
|
||||
class AA {
|
||||
do1() {
|
||||
const b = dd.getB();
|
||||
if (this === b) {
|
||||
console.log("this === b");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
class BB extends AA {
|
||||
getB(): BB { return this; }
|
||||
}
|
||||
|
||||
let dd = new BB();
|
||||
dd.do1();
|
||||
Loading…
x
Reference in New Issue
Block a user