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
r1 is inferred as unknown[] because a is unknown despite s being known. However, could we infer a from s and force the typechecker to insist a is a string?
Given:
r1
is inferred asunknown[]
becausea
isunknown
despites
being known. However, could we infera
froms
and force the typechecker to insista
is a string?If I remove the type from
a
:r2
is now inferred asstring[]
because onlys
is used to infer the type.The text was updated successfully, but these errors were encountered: