this is
return type of method isn't checked when implementing
#57103
Labels
Milestone
this is
return type of method isn't checked when implementing
#57103
π Search Terms
"this is type", "return type", "implement", "inherit", "not checked"
π Version & Regression Information
β― Playground Link
https://www.typescriptlang.org/play?ts=5.3.3#code/JYOwLgpgTgZghgYwgAgILIN4ChnILYRgAWA9gCYCMAFAJQBcyxwAzsi5jrsnAxZwL6cCxcgCZaDAEYkSAGwhwQAbiyCEsuM1YAhNngAO8guFbpsuAPQXkAdSIBPZCBLJoUElAD8QwqUq1MZEFOK2QAATBmAFoIAA99CAQwGKh3KGQAFXsE5AByADcSYDJctlZnMG4tYABzEDhJeUYXMGyUXOk5BRBcnxEycRpAwWDWnIzkAF5kACVCAFcoECyEgB4ASRBmMEUkFYhVsYgSGGRtAD4AbQAiYT8Ka4Bdc6wgA
π» Code
π Actual behavior
B.method1
produces no error, and its return type isvoid
.π Expected behavior
B.method1
should be an error.Additional information about the issue
If
A
in the above example is a class, andB
is extendingA
, this bug will also happen.The text was updated successfully, but these errors were encountered: