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
On DT, lambda-tester is broken by better alias preservation #51698
Nathan Shively-Sanders (@sandersn) locally I see both Actual and Expected as VerifierFn<unknown>, at least on main now. It's possible #51762 "fixed" this by ensuring both behave the same again, by ensuring both have an aliasTypeArguments list. Still, it's definitely weird for it to be VerifierFn<unknown> - it implies something weird with the instantiation ignoring the any type argument default/passed value and using the constraint instead... I'll keep looking into it.
Ah, nope, I'm mistaken, my test case was incomplete - the two forms do, in fact, vary - notably, my test was missing an import for Handler, the result of which makes it behave identically to the VerifierFn<unknown> case, which may help indicate what's going on here.
Figured it out - initially thought it was a difference between weather we did alias inference before or not, but while it is related to alias inference, and needing to make alias inference happen here when it wasn't, it turns out we are doing alias inference already, all that changed was the type argument list (specifically, the earlier preserved alias now has an empty argument list, since it relies on default application). So it turns out it's actually an issue to do with not applying defaults to alias type argument lists during inference, and thus skipping inferences caused by type argument list defaults~
Fix looks pretty small. Will have a PR for extended suite checks shortly~
Activity
weswigham commentedon Dec 5, 2022
Nathan Shively-Sanders (@sandersn) locally I see both
ActualandExpectedasVerifierFn<unknown>, at least onmainnow. It's possible #51762 "fixed" this by ensuring both behave the same again, by ensuring both have analiasTypeArgumentslist. Still, it's definitely weird for it to beVerifierFn<unknown>- it implies something weird with the instantiation ignoring theanytype argument default/passed value and using the constraint instead... I'll keep looking into it.sandersn commentedon Dec 5, 2022
I'll watch https://dev.azure.com/definitelytyped/DefinitelyTyped/_build?definitionId=8&_a=summary to see if lambda-tester passes tomorrow.
weswigham commentedon Dec 5, 2022
Ah, nope, I'm mistaken, my test case was incomplete - the two forms do, in fact, vary - notably, my test was missing an import for
Handler, the result of which makes it behave identically to theVerifierFn<unknown>case, which may help indicate what's going on here.weswigham commentedon Dec 5, 2022
Figured it out - initially thought it was a difference between weather we did alias inference before or not, but while it is related to alias inference, and needing to make alias inference happen here when it wasn't, it turns out we are doing alias inference already, all that changed was the type argument list (specifically, the earlier preserved alias now has an empty argument list, since it relies on default application). So it turns out it's actually an issue to do with not applying defaults to alias type argument lists during inference, and thus skipping inferences caused by type argument list defaults~
Fix looks pretty small. Will have a PR for extended suite checks shortly~