Polymorphic this
behavior after method extraction
#45781
Labels
Duplicate
An existing issue was already created
Bug Report
After extracting a method from a class prototype (which becomes a plain function), the polymorphic
this
still behaves like the function is attached to the class prototype.🔎 Search Terms
polymorphic this
🕗 Version & Regression Information
I saw this happening in the latest current version (4.4.2) and I don't know since when the bug exists.
⏯ Playground Link
Playground link with relevant code
💻 Code
🙁 Actual behavior
The
wrong
,wrong2
,wrong3
,wrong4
variables types resolves tostring[]
🙂 Expected behavior
Compilation errors to prevent the
TypeError: Cannot read properties of undefined
runtime errorsThe text was updated successfully, but these errors were encountered: