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
I expected no error, but got TypeError: Type '{ a: string, b: string }' could not be converted into 'ty'; type { a: string, b: string }[read "b"] (string) is not exactly ty[read "b"][1] (nil) when reassigning t.
The workaround is b = "" :: string?,.
--!stricttypety= {
b:string?,
}
localt:ty= {
b="",
}
t= {
b="", -- TypeError: Type '{ b: string }' could not be converted into 'ty'; type { b: string }[read "b"] (string) is not exactly ty[read "b"][1] (nil)
}
The text was updated successfully, but these errors were encountered:
Luau 0.658
I expected no error, but got
TypeError: Type '{ a: string, b: string }' could not be converted into 'ty'; type { a: string, b: string }[read "b"] (string) is not exactly ty[read "b"][1] (nil)
when reassigningt
.The workaround is
b = "" :: string?,
.The text was updated successfully, but these errors were encountered: