You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
classFoo{method=()=>{console.log('Foo.method')}}classBarextendsFoo{method=()=>{super.method()// Should be a type error, because this fails at runtime.console.log('Foo.method')}}newBar().method()
🙁 Actual behavior
No type error, but there is a runtime error. Here's the error in Chrome:
The text was updated successfully, but these errors were encountered:
trusktr
changed the title
super call in an subclass arrow function property should have a type error (it has a runtime error)
super call in an subclass arrow function property needs type error (prevents a runtime error)
May 31, 2022
Bug Report
🔎 Search Terms
super call subclass arrow function
🕗 Version & Regression Information
⏯ Playground Link
Playground link with relevant code
💻 Code
🙁 Actual behavior
No type error, but there is a runtime error. Here's the error in Chrome:
🙂 Expected behavior
TypeScript can show a type error for this case.
The text was updated successfully, but these errors were encountered: