Adding regression test
This commit is contained in:
parent
bb7818b837
commit
3b1effb7df
19
tests/baselines/reference/controlFlowPropertyInitializer.js
Normal file
19
tests/baselines/reference/controlFlowPropertyInitializer.js
Normal file
|
@ -0,0 +1,19 @@
|
|||
//// [controlFlowPropertyInitializer.ts]
|
||||
|
||||
// Repro from #8967
|
||||
|
||||
const LANG = "Turbo Pascal"
|
||||
|
||||
class BestLanguage {
|
||||
name = LANG;
|
||||
}
|
||||
|
||||
//// [controlFlowPropertyInitializer.js]
|
||||
// Repro from #8967
|
||||
var LANG = "Turbo Pascal";
|
||||
var BestLanguage = (function () {
|
||||
function BestLanguage() {
|
||||
this.name = LANG;
|
||||
}
|
||||
return BestLanguage;
|
||||
}());
|
|
@ -0,0 +1,14 @@
|
|||
=== tests/cases/compiler/controlFlowPropertyInitializer.ts ===
|
||||
|
||||
// Repro from #8967
|
||||
|
||||
const LANG = "Turbo Pascal"
|
||||
>LANG : Symbol(LANG, Decl(controlFlowPropertyInitializer.ts, 3, 5))
|
||||
|
||||
class BestLanguage {
|
||||
>BestLanguage : Symbol(BestLanguage, Decl(controlFlowPropertyInitializer.ts, 3, 27))
|
||||
|
||||
name = LANG;
|
||||
>name : Symbol(BestLanguage.name, Decl(controlFlowPropertyInitializer.ts, 5, 20))
|
||||
>LANG : Symbol(LANG, Decl(controlFlowPropertyInitializer.ts, 3, 5))
|
||||
}
|
|
@ -0,0 +1,15 @@
|
|||
=== tests/cases/compiler/controlFlowPropertyInitializer.ts ===
|
||||
|
||||
// Repro from #8967
|
||||
|
||||
const LANG = "Turbo Pascal"
|
||||
>LANG : string
|
||||
>"Turbo Pascal" : string
|
||||
|
||||
class BestLanguage {
|
||||
>BestLanguage : BestLanguage
|
||||
|
||||
name = LANG;
|
||||
>name : string
|
||||
>LANG : string
|
||||
}
|
9
tests/cases/compiler/controlFlowPropertyInitializer.ts
Normal file
9
tests/cases/compiler/controlFlowPropertyInitializer.ts
Normal file
|
@ -0,0 +1,9 @@
|
|||
// @strictNullChecks: true
|
||||
|
||||
// Repro from #8967
|
||||
|
||||
const LANG = "Turbo Pascal"
|
||||
|
||||
class BestLanguage {
|
||||
name = LANG;
|
||||
}
|
Loading…
Reference in a new issue