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
{{ message }}
Repository navigation
Bug: Chained this-intersecting methods don't work from within class #28159
classBuilder{private_class: undefined;withFoo<T>(){returnthisas this &{foo: T}}withBar<T>(){returnthisas this &{bar: T}}withFooBar<T>(){returnthis.withFoo<T>().withBar<T>();}}letgood=newBuilder().withFoo<number>().withBar<number>();letbad=newBuilder().withFooBar<number>();good=bad;
Looking at the quick info for withFooBar, it would appear that we instantiate the this type for the withBar call in the method body with the class's this, rather than the call target (which would be this & {foo:T}).
Activity
weswigham commentedon Oct 26, 2018
Looking at the quick info for
withFooBar, it would appear that we instantiate thethistype for thewithBarcall in the method body with the class'sthis, rather than the call target (which would bethis & {foo:T}).