Skip to content

Debug Failure. Parameter symbol already has a cached type which differs from newly assigned type. #50773

Description

@albertodvc

Bug Report

🔎 Search Terms

Error: Debug Failure. Expected [object Object] === [object Object]. Parameter symbol already has a cached type which differs from newly assigned type

🕗 Version & Regression Information

  • This is a crash
  • This changed between versions 4.6.4 and 4.7.2
  • This is still happening with the currently latest 4.8.3

⏯ Playground Link

Can't reproduce in the playgorund. To reproduce, run:

tsc code.js --allowJs --noEmit --target esnext.

💻 Code

code.js

classModel{save(){returnthis.createMissingLabels().then(()=>this.$store.save(this));}createMissingLabels(){if(this.labels&&Array.isArray(this.labels)){returnPromise.all(this.labels.map(label=>this.$store.createLabel(label))).then(labels=>(this.labels=labels));}returnPromise.resolve();}}

🙁 Actual behavior

Debug Failure. Expected [object Object] === [object Object]. Parameter symbol already has a cached type which differs from newly assigned type

🙂 Expected behavior

No crash

Metadata

Metadata

Labels

BugA bug in TypeScript

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions