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
In practice the majority of the time people use this in a class they'll want it to be typed as Foo. There're ways around this as you noted but it would be unfortunate to degrade the core class scenarios for that. There are a variety of improvements we are hoping to make to this typing one day though, see #513
Given a class
The compiler infers 'this' to be of type 'Foo' within the 'bar' function. However, the type of 'this' is not guaranteed to be 'Foo'.
Consider
Given this possibility, should the type of 'this' within 'bar' be 'any' instead of 'Foo'?
The text was updated successfully, but these errors were encountered: